vendor: update all dependencies
This commit is contained in:
+365
-290
@@ -1,121 +1,40 @@
|
||||
{
|
||||
"revision": "20170412",
|
||||
"version": "v1",
|
||||
"baseUrl": "https://manufacturers.googleapis.com/",
|
||||
"kind": "discovery#restDescription",
|
||||
"description": "Public API for managing Manufacturer Center related data.",
|
||||
"servicePath": "",
|
||||
"basePath": "",
|
||||
"documentationLink": "https://developers.google.com/manufacturers/",
|
||||
"revision": "20170629",
|
||||
"id": "manufacturers:v1",
|
||||
"discoveryVersion": "v1",
|
||||
"version_module": "True",
|
||||
"schemas": {
|
||||
"ListProductsResponse": {
|
||||
"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": {
|
||||
"products": {
|
||||
"description": "List of the products.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "Product"
|
||||
}
|
||||
},
|
||||
"nextPageToken": {
|
||||
"description": "The token for the retrieval of the next page of product statuses.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"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"
|
||||
},
|
||||
"attributeValue": {
|
||||
"description": "The value of the attribute.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": "ProductDetail"
|
||||
},
|
||||
"Issue": {
|
||||
"description": "Product issue.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"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"
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "The timestamp when this issue appeared.",
|
||||
"format": "google-datetime",
|
||||
"type": "string"
|
||||
},
|
||||
"severity": {
|
||||
"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."
|
||||
]
|
||||
},
|
||||
"description": {
|
||||
"description": "Description of the issue.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "The server-generated type of the issue, for example,\n“INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": "Issue"
|
||||
},
|
||||
"FeatureDescription": {
|
||||
"description": "A feature description of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#featuredesc.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"text": {
|
||||
"description": "A detailed description of the feature.",
|
||||
"type": "string"
|
||||
},
|
||||
"image": {
|
||||
"description": "An optional image describing the feature.",
|
||||
"$ref": "Image"
|
||||
},
|
||||
"headline": {
|
||||
"description": "A short description of the feature.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": "FeatureDescription"
|
||||
"properties": {},
|
||||
"id": "Empty"
|
||||
},
|
||||
"Price": {
|
||||
"description": "A 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"
|
||||
},
|
||||
"currency": {
|
||||
"description": "The currency in which the price is denoted.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": "Price"
|
||||
},
|
||||
"Image": {
|
||||
"description": "An image.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"enumDescriptions": [
|
||||
@@ -148,6 +67,8 @@
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "The type of the image, i.e., crawled or uploaded.\n@OutputOnly",
|
||||
"type": "string",
|
||||
"enumDescriptions": [
|
||||
"Type is unspecified. Should not be used.",
|
||||
"The image was crawled from a provided URL.",
|
||||
@@ -157,41 +78,59 @@
|
||||
"TYPE_UNSPECIFIED",
|
||||
"CRAWLED",
|
||||
"UPLOADED"
|
||||
],
|
||||
"description": "The type of the image, i.e., crawled or uploaded.\n@OutputOnly",
|
||||
"type": "string"
|
||||
]
|
||||
},
|
||||
"imageUrl": {
|
||||
"type": "string",
|
||||
"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."
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"id": "Image",
|
||||
"description": "An image.",
|
||||
"type": "object"
|
||||
"id": "Image"
|
||||
},
|
||||
"Attributes": {
|
||||
"id": "Attributes",
|
||||
"description": "Attributes of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"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"
|
||||
},
|
||||
"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.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"format": {
|
||||
"description": "The format of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#format.",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"videoLink": {
|
||||
"description": "The videos of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#video.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"color": {
|
||||
"description": "The color of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#color.",
|
||||
@@ -206,158 +145,121 @@
|
||||
"type": "string"
|
||||
},
|
||||
"suggestedRetailPrice": {
|
||||
"$ref": "Price",
|
||||
"description": "The suggested retail price (MSRP) of the product. For more information,\nsee https://support.google.com/manufacturers/answer/6124116#price."
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"description": "The size of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#size."
|
||||
"description": "The size of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#size.",
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "The title of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#title."
|
||||
"description": "The title of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#title.",
|
||||
"type": "string"
|
||||
},
|
||||
"count": {
|
||||
"$ref": "Count",
|
||||
"description": "The count of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#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"
|
||||
},
|
||||
"material": {
|
||||
"description": "The material of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#material.",
|
||||
"type": "string"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"ageGroup": {
|
||||
"type": "string",
|
||||
"description": "The target age group of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#agegroup."
|
||||
"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": {
|
||||
"$ref": "ProductDetail"
|
||||
}
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"flavor": {
|
||||
"description": "The flavor of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#flavor.",
|
||||
"ageGroup": {
|
||||
"description": "The target age group of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#agegroup.",
|
||||
"type": "string"
|
||||
},
|
||||
"productPageUrl": {
|
||||
"description": "The URL of the detail page of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#productpage.",
|
||||
"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"
|
||||
},
|
||||
"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": {
|
||||
"type": "string",
|
||||
"description": "The release date of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#release."
|
||||
},
|
||||
"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"
|
||||
}
|
||||
"description": "The release date of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#release.",
|
||||
"type": "string"
|
||||
},
|
||||
"itemGroupId": {
|
||||
"description": "The item group id of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#itemgroupid.",
|
||||
"type": "string"
|
||||
},
|
||||
"gtin": {
|
||||
"description": "The Global Trade Item Number (GTIN) of the product. For more information,\nsee https://support.google.com/manufacturers/answer/6124116#gtin.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"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": "The capacity of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#capacity.",
|
||||
"$ref": "Capacity"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "The description of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#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"
|
||||
},
|
||||
"imageLink": {
|
||||
"description": "The image of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#image.",
|
||||
"$ref": "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"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": "Attributes"
|
||||
},
|
||||
"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": {
|
||||
"value": {
|
||||
"description": "The numeric value of the number of products in a package.",
|
||||
"format": "int64",
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"description": "The unit in which these products are counted.",
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"format": "int64",
|
||||
"description": "The numeric value of the number of products in a package.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": "Count"
|
||||
},
|
||||
"Product": {
|
||||
"id": "Product",
|
||||
"description": "Product data.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"issues": {
|
||||
"description": "A server-generated list of issues associated with the product.\n@OutputOnly",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "Issue"
|
||||
}
|
||||
},
|
||||
"manuallyDeletedAttributes": {
|
||||
"description": "Names of the attributes of the product deleted manually via the\nManufacturer Center UI.\n@OutputOnly",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"finalAttributes": {
|
||||
"$ref": "Attributes",
|
||||
"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"
|
||||
@@ -367,16 +269,16 @@
|
||||
"type": "string"
|
||||
},
|
||||
"uploadedAttributes": {
|
||||
"$ref": "Attributes",
|
||||
"description": "Attributes of the product uploaded via the Manufacturer Center API or via\nfeeds."
|
||||
"description": "Attributes of the product uploaded via the Manufacturer Center API or via\nfeeds.",
|
||||
"$ref": "Attributes"
|
||||
},
|
||||
"parent": {
|
||||
"description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.\n@OutputOnly",
|
||||
"type": "string"
|
||||
},
|
||||
"manuallyProvidedAttributes": {
|
||||
"$ref": "Attributes",
|
||||
"description": "Attributes of the product provided manually via the Manufacturer Center UI.\n@OutputOnly"
|
||||
"description": "Attributes of the product provided manually via the Manufacturer Center UI.\n@OutputOnly",
|
||||
"$ref": "Attributes"
|
||||
},
|
||||
"targetCountry": {
|
||||
"description": "The target country of the product as a CLDR territory code (for example,\nUS).\n@OutputOnly",
|
||||
@@ -387,26 +289,136 @@
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"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"
|
||||
"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"
|
||||
},
|
||||
"manuallyDeletedAttributes": {
|
||||
"description": "Names of the attributes of the product deleted manually via the\nManufacturer Center UI.\n@OutputOnly",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"issues": {
|
||||
"description": "A server-generated list of issues associated with the product.\n@OutputOnly",
|
||||
"items": {
|
||||
"$ref": "Issue"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": "Product"
|
||||
},
|
||||
"Capacity": {
|
||||
"description": "The capacity of a product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#capacity.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"description": "The numeric value of the capacity.",
|
||||
"format": "int64",
|
||||
"unit": {
|
||||
"description": "The unit of the capacity, i.e., MB, GB, or TB.",
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string",
|
||||
"description": "The unit of the capacity, i.e., MB, GB, or TB."
|
||||
"value": {
|
||||
"format": "int64",
|
||||
"description": "The numeric value of the capacity.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": "Capacity"
|
||||
},
|
||||
"ListProductsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"products": {
|
||||
"description": "List of the products.",
|
||||
"items": {
|
||||
"$ref": "Product"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"nextPageToken": {
|
||||
"description": "The token for the retrieval of the next page of product statuses.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"Issue": {
|
||||
"description": "Product issue.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"timestamp": {
|
||||
"format": "google-datetime",
|
||||
"description": "The timestamp when this issue appeared.",
|
||||
"type": "string"
|
||||
},
|
||||
"severity": {
|
||||
"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."
|
||||
],
|
||||
"enum": [
|
||||
"SEVERITY_UNSPECIFIED",
|
||||
"ERROR",
|
||||
"WARNING",
|
||||
"INFO"
|
||||
],
|
||||
"description": "The severity of the issue.",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"description": "Description of the issue.",
|
||||
"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"
|
||||
},
|
||||
"FeatureDescription": {
|
||||
"description": "A feature description of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#featuredesc.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"text": {
|
||||
"description": "A detailed description of the feature.",
|
||||
"type": "string"
|
||||
},
|
||||
"image": {
|
||||
"$ref": "Image",
|
||||
"description": "An optional image describing the feature."
|
||||
},
|
||||
"headline": {
|
||||
"description": "A short description of the feature.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": "FeatureDescription"
|
||||
}
|
||||
},
|
||||
"icons": {
|
||||
@@ -435,46 +447,44 @@
|
||||
"resources": {
|
||||
"products": {
|
||||
"methods": {
|
||||
"list": {
|
||||
"description": "Lists all the products in a Manufacturer Center account.",
|
||||
"httpMethod": "GET",
|
||||
"parameterOrder": [
|
||||
"parent"
|
||||
],
|
||||
"delete": {
|
||||
"description": "Deletes the product from a Manufacturer Center account.",
|
||||
"response": {
|
||||
"$ref": "ListProductsResponse"
|
||||
"$ref": "Empty"
|
||||
},
|
||||
"parameterOrder": [
|
||||
"parent",
|
||||
"name"
|
||||
],
|
||||
"httpMethod": "DELETE",
|
||||
"parameters": {
|
||||
"parent": {
|
||||
"description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"pattern": "^accounts/[^/]+$",
|
||||
"location": "path"
|
||||
},
|
||||
"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.",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"pattern": "^[^/]+$",
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/manufacturercenter"
|
||||
],
|
||||
"parameters": {
|
||||
"parent": {
|
||||
"location": "path",
|
||||
"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/[^/]+$"
|
||||
},
|
||||
"pageToken": {
|
||||
"description": "The token returned by the previous request.",
|
||||
"type": "string",
|
||||
"location": "query"
|
||||
},
|
||||
"pageSize": {
|
||||
"location": "query",
|
||||
"description": "Maximum number of product statuses to return in the response, used for\npaging.",
|
||||
"format": "int32",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"flatPath": "v1/accounts/{accountsId}/products",
|
||||
"id": "manufacturers.accounts.products.list",
|
||||
"path": "v1/{+parent}/products"
|
||||
"flatPath": "v1/accounts/{accountsId}/products/{productsId}",
|
||||
"id": "manufacturers.accounts.products.delete",
|
||||
"path": "v1/{+parent}/products/{+name}"
|
||||
},
|
||||
"get": {
|
||||
"path": "v1/{+parent}/products/{+name}",
|
||||
"flatPath": "v1/accounts/{accountsId}/products/{productsId}",
|
||||
"id": "manufacturers.accounts.products.get",
|
||||
"description": "Gets the product from a Manufacturer Center account, including product\nissues.",
|
||||
"path": "v1/{+parent}/products/{+name}",
|
||||
"description": "Gets the product from a Manufacturer Center account, including product\nissues.\n\nA recently updated product takes some time to be processed before any\nchanges are visible. While some issues may be available once the product\nhas been processed, other issues may take days to appear.",
|
||||
"response": {
|
||||
"$ref": "Product"
|
||||
},
|
||||
@@ -483,26 +493,97 @@
|
||||
"name"
|
||||
],
|
||||
"httpMethod": "GET",
|
||||
"parameters": {
|
||||
"parent": {
|
||||
"description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"pattern": "^accounts/[^/]+$",
|
||||
"location": "path"
|
||||
},
|
||||
"name": {
|
||||
"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.",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"pattern": "^[^/]+$"
|
||||
}
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/manufacturercenter"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"description": "Lists all the products in a Manufacturer Center account.",
|
||||
"response": {
|
||||
"$ref": "ListProductsResponse"
|
||||
},
|
||||
"parameterOrder": [
|
||||
"parent"
|
||||
],
|
||||
"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"
|
||||
"pageSize": {
|
||||
"location": "query",
|
||||
"format": "int32",
|
||||
"description": "Maximum number of product statuses to return in the response, used for\npaging.",
|
||||
"type": "integer"
|
||||
},
|
||||
"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",
|
||||
"required": true,
|
||||
"pattern": "^accounts/[^/]+$",
|
||||
"location": "path"
|
||||
},
|
||||
"pageToken": {
|
||||
"description": "The token returned by the previous request.",
|
||||
"type": "string",
|
||||
"location": "query"
|
||||
}
|
||||
},
|
||||
"flatPath": "v1/accounts/{accountsId}/products",
|
||||
"id": "manufacturers.accounts.products.list",
|
||||
"path": "v1/{+parent}/products"
|
||||
},
|
||||
"update": {
|
||||
"request": {
|
||||
"$ref": "Product"
|
||||
},
|
||||
"description": "Inserts or updates the product in a Manufacturer Center account.\n\nThe checks at upload time are minimal. All required attributes need to be\npresent for a product to be valid. Issues may show up later\nafter the API has accepted an update for a product and it is possible to\noverwrite an existing valid product with an invalid product. To detect\nthis, you should retrieve the product and check it for issues once the\nupdated version is available.\n\nInserted or updated products first need to be processed before they can be\nretrieved. Until then, new products will be unavailable, and retrieval\nof updated products will return the original state of the product.",
|
||||
"response": {
|
||||
"$ref": "Product"
|
||||
},
|
||||
"parameterOrder": [
|
||||
"parent",
|
||||
"name"
|
||||
],
|
||||
"httpMethod": "PUT",
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/manufacturercenter"
|
||||
],
|
||||
"parameters": {
|
||||
"parent": {
|
||||
"description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"pattern": "^accounts/[^/]+$",
|
||||
"location": "path"
|
||||
},
|
||||
"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.",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"pattern": "^[^/]+$",
|
||||
"location": "path"
|
||||
}
|
||||
},
|
||||
"flatPath": "v1/accounts/{accountsId}/products/{productsId}"
|
||||
"flatPath": "v1/accounts/{accountsId}/products/{productsId}",
|
||||
"id": "manufacturers.accounts.products.update",
|
||||
"path": "v1/{+parent}/products/{+name}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -510,26 +591,36 @@
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"upload_protocol": {
|
||||
"oauth_token": {
|
||||
"location": "query",
|
||||
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
|
||||
"description": "OAuth 2.0 token for the current user.",
|
||||
"type": "string"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"prettyPrint": {
|
||||
"location": "query",
|
||||
"description": "Returns response with indentations and line breaks.",
|
||||
"default": "true",
|
||||
"type": "boolean",
|
||||
"default": "true"
|
||||
"location": "query"
|
||||
},
|
||||
"uploadType": {
|
||||
"type": "string",
|
||||
"location": "query",
|
||||
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")."
|
||||
"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"
|
||||
"type": "string",
|
||||
"location": "query"
|
||||
},
|
||||
"callback": {
|
||||
"location": "query",
|
||||
@@ -537,19 +628,25 @@
|
||||
"type": "string"
|
||||
},
|
||||
"$.xgafv": {
|
||||
"enumDescriptions": [
|
||||
"v1 error format",
|
||||
"v2 error format"
|
||||
],
|
||||
"location": "query",
|
||||
"enum": [
|
||||
"1",
|
||||
"2"
|
||||
],
|
||||
"description": "V1 error format.",
|
||||
"type": "string",
|
||||
"enumDescriptions": [
|
||||
"v1 error format",
|
||||
"v2 error format"
|
||||
],
|
||||
"location": "query"
|
||||
"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": [
|
||||
@@ -557,17 +654,6 @@
|
||||
"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": {
|
||||
@@ -575,6 +661,11 @@
|
||||
"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",
|
||||
@@ -583,24 +674,8 @@
|
||||
"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"
|
||||
"default": "true",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"version": "v1",
|
||||
"baseUrl": "https://manufacturers.googleapis.com/",
|
||||
"servicePath": "",
|
||||
"description": "Public API for managing Manufacturer Center related data.",
|
||||
"kind": "discovery#restDescription",
|
||||
"basePath": ""
|
||||
}
|
||||
}
|
||||
|
||||
+325
-1
@@ -366,6 +366,24 @@ func (s *Count) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// Empty: 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 `{}`.
|
||||
type Empty struct {
|
||||
// ServerResponse contains the HTTP response code and headers from the
|
||||
// server.
|
||||
googleapi.ServerResponse `json:"-"`
|
||||
}
|
||||
|
||||
// FeatureDescription: A feature description of the product. For more
|
||||
// information,
|
||||
// see
|
||||
@@ -737,6 +755,142 @@ func (s *ProductDetail) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// method id "manufacturers.accounts.products.delete":
|
||||
|
||||
type AccountsProductsDeleteCall struct {
|
||||
s *Service
|
||||
parent string
|
||||
name string
|
||||
urlParams_ gensupport.URLParams
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// Delete: Deletes the product from a Manufacturer Center account.
|
||||
func (r *AccountsProductsService) Delete(parent string, name string) *AccountsProductsDeleteCall {
|
||||
c := &AccountsProductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.parent = parent
|
||||
c.name = name
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *AccountsProductsDeleteCall) Fields(s ...googleapi.Field) *AccountsProductsDeleteCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *AccountsProductsDeleteCall) Context(ctx context.Context) *AccountsProductsDeleteCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *AccountsProductsDeleteCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *AccountsProductsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/products/{+name}")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("DELETE", urls, body)
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"parent": c.parent,
|
||||
"name": c.name,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "manufacturers.accounts.products.delete" call.
|
||||
// Exactly one of *Empty or error will be non-nil. Any non-2xx status
|
||||
// code is an error. Response headers are in either
|
||||
// *Empty.ServerResponse.Header or (if a response was returned at all)
|
||||
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
|
||||
// check whether the returned error was because http.StatusNotModified
|
||||
// was returned.
|
||||
func (c *AccountsProductsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
|
||||
gensupport.SetOptions(c.urlParams_, opts...)
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, &googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ret := &Empty{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Deletes the product from a Manufacturer Center account.",
|
||||
// "flatPath": "v1/accounts/{accountsId}/products/{productsId}",
|
||||
// "httpMethod": "DELETE",
|
||||
// "id": "manufacturers.accounts.products.delete",
|
||||
// "parameterOrder": [
|
||||
// "parent",
|
||||
// "name"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "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.",
|
||||
// "location": "path",
|
||||
// "pattern": "^[^/]+$",
|
||||
// "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.",
|
||||
// "location": "path",
|
||||
// "pattern": "^accounts/[^/]+$",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "v1/{+parent}/products/{+name}",
|
||||
// "response": {
|
||||
// "$ref": "Empty"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/manufacturercenter"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "manufacturers.accounts.products.get":
|
||||
|
||||
type AccountsProductsGetCall struct {
|
||||
@@ -752,6 +906,12 @@ type AccountsProductsGetCall struct {
|
||||
// Get: Gets the product from a Manufacturer Center account, including
|
||||
// product
|
||||
// issues.
|
||||
//
|
||||
// A recently updated product takes some time to be processed before
|
||||
// any
|
||||
// changes are visible. While some issues may be available once the
|
||||
// product
|
||||
// has been processed, other issues may take days to appear.
|
||||
func (r *AccountsProductsService) Get(parent string, name string) *AccountsProductsGetCall {
|
||||
c := &AccountsProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.parent = parent
|
||||
@@ -854,7 +1014,7 @@ func (c *AccountsProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, er
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Gets the product from a Manufacturer Center account, including product\nissues.",
|
||||
// "description": "Gets the product from a Manufacturer Center account, including product\nissues.\n\nA recently updated product takes some time to be processed before any\nchanges are visible. While some issues may be available once the product\nhas been processed, other issues may take days to appear.",
|
||||
// "flatPath": "v1/accounts/{accountsId}/products/{productsId}",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "manufacturers.accounts.products.get",
|
||||
@@ -1074,3 +1234,167 @@ func (c *AccountsProductsListCall) Pages(ctx context.Context, f func(*ListProduc
|
||||
c.PageToken(x.NextPageToken)
|
||||
}
|
||||
}
|
||||
|
||||
// method id "manufacturers.accounts.products.update":
|
||||
|
||||
type AccountsProductsUpdateCall struct {
|
||||
s *Service
|
||||
parent string
|
||||
name string
|
||||
product *Product
|
||||
urlParams_ gensupport.URLParams
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// Update: Inserts or updates the product in a Manufacturer Center
|
||||
// account.
|
||||
//
|
||||
// The checks at upload time are minimal. All required attributes need
|
||||
// to be
|
||||
// present for a product to be valid. Issues may show up later
|
||||
// after the API has accepted an update for a product and it is possible
|
||||
// to
|
||||
// overwrite an existing valid product with an invalid product. To
|
||||
// detect
|
||||
// this, you should retrieve the product and check it for issues once
|
||||
// the
|
||||
// updated version is available.
|
||||
//
|
||||
// Inserted or updated products first need to be processed before they
|
||||
// can be
|
||||
// retrieved. Until then, new products will be unavailable, and
|
||||
// retrieval
|
||||
// of updated products will return the original state of the product.
|
||||
func (r *AccountsProductsService) Update(parent string, name string, product *Product) *AccountsProductsUpdateCall {
|
||||
c := &AccountsProductsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.parent = parent
|
||||
c.name = name
|
||||
c.product = product
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *AccountsProductsUpdateCall) Fields(s ...googleapi.Field) *AccountsProductsUpdateCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *AccountsProductsUpdateCall) Context(ctx context.Context) *AccountsProductsUpdateCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *AccountsProductsUpdateCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *AccountsProductsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
body, err := googleapi.WithoutDataWrapper.JSONReader(c.product)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/products/{+name}")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("PUT", urls, body)
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"parent": c.parent,
|
||||
"name": c.name,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "manufacturers.accounts.products.update" call.
|
||||
// Exactly one of *Product or error will be non-nil. Any non-2xx status
|
||||
// code is an error. Response headers are in either
|
||||
// *Product.ServerResponse.Header or (if a response was returned at all)
|
||||
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
|
||||
// check whether the returned error was because http.StatusNotModified
|
||||
// was returned.
|
||||
func (c *AccountsProductsUpdateCall) Do(opts ...googleapi.CallOption) (*Product, error) {
|
||||
gensupport.SetOptions(c.urlParams_, opts...)
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, &googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ret := &Product{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Inserts or updates the product in a Manufacturer Center account.\n\nThe checks at upload time are minimal. All required attributes need to be\npresent for a product to be valid. Issues may show up later\nafter the API has accepted an update for a product and it is possible to\noverwrite an existing valid product with an invalid product. To detect\nthis, you should retrieve the product and check it for issues once the\nupdated version is available.\n\nInserted or updated products first need to be processed before they can be\nretrieved. Until then, new products will be unavailable, and retrieval\nof updated products will return the original state of the product.",
|
||||
// "flatPath": "v1/accounts/{accountsId}/products/{productsId}",
|
||||
// "httpMethod": "PUT",
|
||||
// "id": "manufacturers.accounts.products.update",
|
||||
// "parameterOrder": [
|
||||
// "parent",
|
||||
// "name"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "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.",
|
||||
// "location": "path",
|
||||
// "pattern": "^[^/]+$",
|
||||
// "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.",
|
||||
// "location": "path",
|
||||
// "pattern": "^accounts/[^/]+$",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "v1/{+parent}/products/{+name}",
|
||||
// "request": {
|
||||
// "$ref": "Product"
|
||||
// },
|
||||
// "response": {
|
||||
// "$ref": "Product"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/manufacturercenter"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user