Upsert
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.dev.retailmedia.verve.com/v1alpha/inventory/mgmt:upsert"
payload := strings.NewReader("{ \"location\": { \"metadata\": { \"name\": \"example\", \"labels\": { \"additionalProperty\": \"example\" } }, \"mask\": \"example\", \"supportedCurrencies\": [ \"example\" ], \"supportedLanguages\": [ \"example\" ], \"status\": \"STATUS_UNSPECIFIED\", \"timezone\": \"example\", \"address\": { \"country\": \"example\", \"city\": \"example\", \"street\": \"example\", \"number\": \"example\", \"zipCode\": \"example\", \"region\": \"example\", \"state\": \"example\" }, \"venue\": \"VENUE_UNSPECIFIED\", \"zones\": [ { \"internalId\": \"example\", \"externalId\": \"example\", \"retailGrocery\": { \"type\": \"VENUE_RETAIL_GROCERY_UNSPECIFIED\", \"aisles\": [ \"AISLE_UNSPECIFIED\" ] }, \"retailMall\": { \"type\": \"VENUE_RETAIL_MALLS_UNSPECIFIED\" } } ], \"coordinates\": { \"latitude\": 1, \"longitude\": 1 }, \"weeklyHours\": [ { \"day\": \"DAY_OF_WEEK_UNSPECIFIED\", \"availability\": \"AVAILABILITY_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 } } ], \"dateOverrides\": [ { \"date\": { \"year\": 1, \"month\": 1, \"day\": 1 }, \"availability\": \"AVAILABILITY_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 } } ], \"externalId\": \"example\", \"gln\": \"example\", \"tdlinx\": \"example\", \"nielsenArea\": \"NIELSEN_AREA_UNSPECIFIED\", \"salesAreaSqm\": 1, \"storeChain\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"storeSubchain\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"merchant\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"municipality\": { \"name\": \"example\", \"administrativeArea\": \"example\", \"population\": 1 }, \"excludedAdProducts\": [ \"AD_PRODUCT_UNSPECIFIED\" ] }, \"device\": { \"metadata\": { \"name\": \"example\", \"labels\": { \"additionalProperty\": \"example\" } }, \"mask\": \"example\", \"location\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } }, \"zone\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } }, \"type\": \"DEVICE_TYPE_UNSPECIFIED\", \"status\": \"STATUS_UNSPECIFIED\", \"deployment\": { \"allocationTargets\": [ { \"static\": { \"percentage\": 1, \"adServers\": [ { \"reference\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } } } ] }, \"nonStatic\": { \"adServers\": [ { \"reference\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } } } ], \"balancePolicy\": \"AD_SERVER_BALANCE_POLICY_UNSPECIFIED\" } } ], \"adNetworks\": [ \"example\" ] }, \"supportedAdTypes\": [ { \"adType\": \"AD_TYPE_UNSPECIFIED\", \"formats\": [ \"example\" ] } ], \"externalId\": \"example\", \"identifier\": { \"key\": \"example\", \"playerId\": \"example\" }, \"screenCount\": 1, \"sensors\": [ \"SENSOR_UNSPECIFIED\" ], \"deviceOwner\": \"example\", \"playoutImpressionFactors\": [ { \"day\": \"DAY_OF_WEEK_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"factor\": 1 } ], \"excludedAdProducts\": [ \"AD_PRODUCT_UNSPECIFIED\" ] } }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Verve-Namespace", "<X-Verve-Namespace>") req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.dev.retailmedia.verve.com/v1alpha/inventory/mgmt:upsert")) .header("X-Verve-Namespace", "<X-Verve-Namespace>") .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .method("POST", HttpRequest.BodyPublishers.ofString("{ \"location\": { \"metadata\": { \"name\": \"example\", \"labels\": { \"additionalProperty\": \"example\" } }, \"mask\": \"example\", \"supportedCurrencies\": [ \"example\" ], \"supportedLanguages\": [ \"example\" ], \"status\": \"STATUS_UNSPECIFIED\", \"timezone\": \"example\", \"address\": { \"country\": \"example\", \"city\": \"example\", \"street\": \"example\", \"number\": \"example\", \"zipCode\": \"example\", \"region\": \"example\", \"state\": \"example\" }, \"venue\": \"VENUE_UNSPECIFIED\", \"zones\": [ { \"internalId\": \"example\", \"externalId\": \"example\", \"retailGrocery\": { \"type\": \"VENUE_RETAIL_GROCERY_UNSPECIFIED\", \"aisles\": [ \"AISLE_UNSPECIFIED\" ] }, \"retailMall\": { \"type\": \"VENUE_RETAIL_MALLS_UNSPECIFIED\" } } ], \"coordinates\": { \"latitude\": 1, \"longitude\": 1 }, \"weeklyHours\": [ { \"day\": \"DAY_OF_WEEK_UNSPECIFIED\", \"availability\": \"AVAILABILITY_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 } } ], \"dateOverrides\": [ { \"date\": { \"year\": 1, \"month\": 1, \"day\": 1 }, \"availability\": \"AVAILABILITY_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 } } ], \"externalId\": \"example\", \"gln\": \"example\", \"tdlinx\": \"example\", \"nielsenArea\": \"NIELSEN_AREA_UNSPECIFIED\", \"salesAreaSqm\": 1, \"storeChain\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"storeSubchain\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"merchant\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"municipality\": { \"name\": \"example\", \"administrativeArea\": \"example\", \"population\": 1 }, \"excludedAdProducts\": [ \"AD_PRODUCT_UNSPECIFIED\" ] }, \"device\": { \"metadata\": { \"name\": \"example\", \"labels\": { \"additionalProperty\": \"example\" } }, \"mask\": \"example\", \"location\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } }, \"zone\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } }, \"type\": \"DEVICE_TYPE_UNSPECIFIED\", \"status\": \"STATUS_UNSPECIFIED\", \"deployment\": { \"allocationTargets\": [ { \"static\": { \"percentage\": 1, \"adServers\": [ { \"reference\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } } } ] }, \"nonStatic\": { \"adServers\": [ { \"reference\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } } } ], \"balancePolicy\": \"AD_SERVER_BALANCE_POLICY_UNSPECIFIED\" } } ], \"adNetworks\": [ \"example\" ] }, \"supportedAdTypes\": [ { \"adType\": \"AD_TYPE_UNSPECIFIED\", \"formats\": [ \"example\" ] } ], \"externalId\": \"example\", \"identifier\": { \"key\": \"example\", \"playerId\": \"example\" }, \"screenCount\": 1, \"sensors\": [ \"SENSOR_UNSPECIFIED\" ], \"deviceOwner\": \"example\", \"playoutImpressionFactors\": [ { \"day\": \"DAY_OF_WEEK_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"factor\": 1 } ], \"excludedAdProducts\": [ \"AD_PRODUCT_UNSPECIFIED\" ] } }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"location\": { \"metadata\": { \"name\": \"example\", \"labels\": { \"additionalProperty\": \"example\" } }, \"mask\": \"example\", \"supportedCurrencies\": [ \"example\" ], \"supportedLanguages\": [ \"example\" ], \"status\": \"STATUS_UNSPECIFIED\", \"timezone\": \"example\", \"address\": { \"country\": \"example\", \"city\": \"example\", \"street\": \"example\", \"number\": \"example\", \"zipCode\": \"example\", \"region\": \"example\", \"state\": \"example\" }, \"venue\": \"VENUE_UNSPECIFIED\", \"zones\": [ { \"internalId\": \"example\", \"externalId\": \"example\", \"retailGrocery\": { \"type\": \"VENUE_RETAIL_GROCERY_UNSPECIFIED\", \"aisles\": [ \"AISLE_UNSPECIFIED\" ] }, \"retailMall\": { \"type\": \"VENUE_RETAIL_MALLS_UNSPECIFIED\" } } ], \"coordinates\": { \"latitude\": 1, \"longitude\": 1 }, \"weeklyHours\": [ { \"day\": \"DAY_OF_WEEK_UNSPECIFIED\", \"availability\": \"AVAILABILITY_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 } } ], \"dateOverrides\": [ { \"date\": { \"year\": 1, \"month\": 1, \"day\": 1 }, \"availability\": \"AVAILABILITY_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 } } ], \"externalId\": \"example\", \"gln\": \"example\", \"tdlinx\": \"example\", \"nielsenArea\": \"NIELSEN_AREA_UNSPECIFIED\", \"salesAreaSqm\": 1, \"storeChain\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"storeSubchain\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"merchant\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"municipality\": { \"name\": \"example\", \"administrativeArea\": \"example\", \"population\": 1 }, \"excludedAdProducts\": [ \"AD_PRODUCT_UNSPECIFIED\" ] }, \"device\": { \"metadata\": { \"name\": \"example\", \"labels\": { \"additionalProperty\": \"example\" } }, \"mask\": \"example\", \"location\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } }, \"zone\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } }, \"type\": \"DEVICE_TYPE_UNSPECIFIED\", \"status\": \"STATUS_UNSPECIFIED\", \"deployment\": { \"allocationTargets\": [ { \"static\": { \"percentage\": 1, \"adServers\": [ { \"reference\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } } } ] }, \"nonStatic\": { \"adServers\": [ { \"reference\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } } } ], \"balancePolicy\": \"AD_SERVER_BALANCE_POLICY_UNSPECIFIED\" } } ], \"adNetworks\": [ \"example\" ] }, \"supportedAdTypes\": [ { \"adType\": \"AD_TYPE_UNSPECIFIED\", \"formats\": [ \"example\" ] } ], \"externalId\": \"example\", \"identifier\": { \"key\": \"example\", \"playerId\": \"example\" }, \"screenCount\": 1, \"sensors\": [ \"SENSOR_UNSPECIFIED\" ], \"deviceOwner\": \"example\", \"playoutImpressionFactors\": [ { \"day\": \"DAY_OF_WEEK_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"factor\": 1 } ], \"excludedAdProducts\": [ \"AD_PRODUCT_UNSPECIFIED\" ] } }");Request request = new Request.Builder() .url("https://api.dev.retailmedia.verve.com/v1alpha/inventory/mgmt:upsert") .post(body) .addHeader("X-Verve-Namespace", "<X-Verve-Namespace>") .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")val body = RequestBody.create(mediaType, "{ \"location\": { \"metadata\": { \"name\": \"example\", \"labels\": { \"additionalProperty\": \"example\" } }, \"mask\": \"example\", \"supportedCurrencies\": [ \"example\" ], \"supportedLanguages\": [ \"example\" ], \"status\": \"STATUS_UNSPECIFIED\", \"timezone\": \"example\", \"address\": { \"country\": \"example\", \"city\": \"example\", \"street\": \"example\", \"number\": \"example\", \"zipCode\": \"example\", \"region\": \"example\", \"state\": \"example\" }, \"venue\": \"VENUE_UNSPECIFIED\", \"zones\": [ { \"internalId\": \"example\", \"externalId\": \"example\", \"retailGrocery\": { \"type\": \"VENUE_RETAIL_GROCERY_UNSPECIFIED\", \"aisles\": [ \"AISLE_UNSPECIFIED\" ] }, \"retailMall\": { \"type\": \"VENUE_RETAIL_MALLS_UNSPECIFIED\" } } ], \"coordinates\": { \"latitude\": 1, \"longitude\": 1 }, \"weeklyHours\": [ { \"day\": \"DAY_OF_WEEK_UNSPECIFIED\", \"availability\": \"AVAILABILITY_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 } } ], \"dateOverrides\": [ { \"date\": { \"year\": 1, \"month\": 1, \"day\": 1 }, \"availability\": \"AVAILABILITY_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 } } ], \"externalId\": \"example\", \"gln\": \"example\", \"tdlinx\": \"example\", \"nielsenArea\": \"NIELSEN_AREA_UNSPECIFIED\", \"salesAreaSqm\": 1, \"storeChain\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"storeSubchain\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"merchant\": { \"internalId\": \"example\", \"externalId\": \"example\", \"name\": \"example\" }, \"municipality\": { \"name\": \"example\", \"administrativeArea\": \"example\", \"population\": 1 }, \"excludedAdProducts\": [ \"AD_PRODUCT_UNSPECIFIED\" ] }, \"device\": { \"metadata\": { \"name\": \"example\", \"labels\": { \"additionalProperty\": \"example\" } }, \"mask\": \"example\", \"location\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } }, \"zone\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } }, \"type\": \"DEVICE_TYPE_UNSPECIFIED\", \"status\": \"STATUS_UNSPECIFIED\", \"deployment\": { \"allocationTargets\": [ { \"static\": { \"percentage\": 1, \"adServers\": [ { \"reference\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } } } ] }, \"nonStatic\": { \"adServers\": [ { \"reference\": { \"id\": \"example\", \"fqn\": \"example\", \"resource\": { \"@type\": \"example\" } } } ], \"balancePolicy\": \"AD_SERVER_BALANCE_POLICY_UNSPECIFIED\" } } ], \"adNetworks\": [ \"example\" ] }, \"supportedAdTypes\": [ { \"adType\": \"AD_TYPE_UNSPECIFIED\", \"formats\": [ \"example\" ] } ], \"externalId\": \"example\", \"identifier\": { \"key\": \"example\", \"playerId\": \"example\" }, \"screenCount\": 1, \"sensors\": [ \"SENSOR_UNSPECIFIED\" ], \"deviceOwner\": \"example\", \"playoutImpressionFactors\": [ { \"day\": \"DAY_OF_WEEK_UNSPECIFIED\", \"start\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"end\": { \"hours\": 1, \"minutes\": 1, \"seconds\": 1, \"nanos\": 1 }, \"factor\": 1 } ], \"excludedAdProducts\": [ \"AD_PRODUCT_UNSPECIFIED\" ] } }")val request = Request.Builder() .url("https://api.dev.retailmedia.verve.com/v1alpha/inventory/mgmt:upsert") .post(body) .addHeader("X-Verve-Namespace", "<X-Verve-Namespace>") .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build()
val response = client.newCall(request).execute()curl --request POST \ --url https://api.dev.retailmedia.verve.com/v1alpha/inventory/mgmt:upsert \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Verve-Namespace: <X-Verve-Namespace>' \ --data '{ "location": { "metadata": { "name": "example", "labels": { "additionalProperty": "example" } }, "mask": "example", "supportedCurrencies": [ "example" ], "supportedLanguages": [ "example" ], "status": "STATUS_UNSPECIFIED", "timezone": "example", "address": { "country": "example", "city": "example", "street": "example", "number": "example", "zipCode": "example", "region": "example", "state": "example" }, "venue": "VENUE_UNSPECIFIED", "zones": [ { "internalId": "example", "externalId": "example", "retailGrocery": { "type": "VENUE_RETAIL_GROCERY_UNSPECIFIED", "aisles": [ "AISLE_UNSPECIFIED" ] }, "retailMall": { "type": "VENUE_RETAIL_MALLS_UNSPECIFIED" } } ], "coordinates": { "latitude": 1, "longitude": 1 }, "weeklyHours": [ { "day": "DAY_OF_WEEK_UNSPECIFIED", "availability": "AVAILABILITY_UNSPECIFIED", "start": { "hours": 1, "minutes": 1, "seconds": 1, "nanos": 1 }, "end": { "hours": 1, "minutes": 1, "seconds": 1, "nanos": 1 } } ], "dateOverrides": [ { "date": { "year": 1, "month": 1, "day": 1 }, "availability": "AVAILABILITY_UNSPECIFIED", "start": { "hours": 1, "minutes": 1, "seconds": 1, "nanos": 1 }, "end": { "hours": 1, "minutes": 1, "seconds": 1, "nanos": 1 } } ], "externalId": "example", "gln": "example", "tdlinx": "example", "nielsenArea": "NIELSEN_AREA_UNSPECIFIED", "salesAreaSqm": 1, "storeChain": { "internalId": "example", "externalId": "example", "name": "example" }, "storeSubchain": { "internalId": "example", "externalId": "example", "name": "example" }, "merchant": { "internalId": "example", "externalId": "example", "name": "example" }, "municipality": { "name": "example", "administrativeArea": "example", "population": 1 }, "excludedAdProducts": [ "AD_PRODUCT_UNSPECIFIED" ] }, "device": { "metadata": { "name": "example", "labels": { "additionalProperty": "example" } }, "mask": "example", "location": { "id": "example", "fqn": "example", "resource": { "@type": "example" } }, "zone": { "id": "example", "fqn": "example", "resource": { "@type": "example" } }, "type": "DEVICE_TYPE_UNSPECIFIED", "status": "STATUS_UNSPECIFIED", "deployment": { "allocationTargets": [ { "static": { "percentage": 1, "adServers": [ { "reference": { "id": "example", "fqn": "example", "resource": { "@type": "example" } } } ] }, "nonStatic": { "adServers": [ { "reference": { "id": "example", "fqn": "example", "resource": { "@type": "example" } } } ], "balancePolicy": "AD_SERVER_BALANCE_POLICY_UNSPECIFIED" } } ], "adNetworks": [ "example" ] }, "supportedAdTypes": [ { "adType": "AD_TYPE_UNSPECIFIED", "formats": [ "example" ] } ], "externalId": "example", "identifier": { "key": "example", "playerId": "example" }, "screenCount": 1, "sensors": [ "SENSOR_UNSPECIFIED" ], "deviceOwner": "example", "playoutImpressionFactors": [ { "day": "DAY_OF_WEEK_UNSPECIFIED", "start": { "hours": 1, "minutes": 1, "seconds": 1, "nanos": 1 }, "end": { "hours": 1, "minutes": 1, "seconds": 1, "nanos": 1 }, "factor": 1 } ], "excludedAdProducts": [ "AD_PRODUCT_UNSPECIFIED" ] } }'Authorizations
Section titled “ Authorizations ”Request Body
Section titled “ Request Body ”object
Location represents a retail store with its full operational profile.
object
The metadata of the location.
object
The unique identifier for the resource.
The fully qualified name of the resource.
The name of the resource.
The timestamp when the resource was first created.
The timestamp when the resource was last updated.
The revision of the resource. Must be empty if the resource is not under version control.
object
The unique identifier for a particular revision of the resource.
The timestamp when this particular revision was created.
The unique identifier for the latest revision of the resource. Must be empty if this is already the latest revision.
The labels of the resource.
object
The fields to update or to return in the location.
ISO 4217 currency codes, e.g. “EUR”.
BCP-47 language tags, e.g. [“de”, “en”].
The operational status of the location.
IANA timezone, e.g. “Europe/Berlin”.
object
DOOH venue classification (parent + child tiers from OpenOOH v1.2.1).
Named zones / aisles within the location.
Zone is a named area / aisle within a Location.
object
Read-only unique identifier.
Client defined unique id.
VenueRetailGroceryZone represents a zone within a grocery store.
object
Grandchild venue classification (ENTRANCE, CHECK_OUT, AISLES, EXTERIOR).
Product aisles within this zone (e.g., PRODUCE, DAIRY).
VenueRetailMallZone represents a zone within a mall store.
object
Grandchild venue classification (CONCOURSE, FOOD_COURT, SPECTACULAR).
GPS coordinates of the location.
object
The latitude in degrees. It must be in the range [-90.0, +90.0].
The longitude in degrees. It must be in the range [-180.0, +180.0].
Recurring weekly operating rules (open/closed windows per day).
WeeklyHours is a recurring weekly operating rule for a single day. An unset start/end means the rule applies to the whole day.
object
Represents a day of the week.
- DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified.
- MONDAY: Monday
- TUESDAY: Tuesday
- WEDNESDAY: Wednesday
- THURSDAY: Thursday
- FRIDAY: Friday
- SATURDAY: Saturday
- SUNDAY: Sunday
Availability indicates whether a time rule opens or closes the location.
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
Date-specific operating overrides (annual if year=0, otherwise one-off).
DateOverride is a date-specific operating rule. year=0 means it recurs annually; otherwise it is a one-off date. An unset start/end means the rule applies to the whole day.
object
- A full date, with non-zero year, month, and day values.
- A month and day, with a zero year (for example, an anniversary).
- A year on its own, with a zero month and a zero day.
- A year and month, with a zero day (for example, a credit card expiration date).
Related types:
- [google.type.TimeOfDay][google.type.TimeOfDay]
- [google.type.DateTime][google.type.DateTime]
- [google.protobuf.Timestamp][google.protobuf.Timestamp]
object
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn’t significant.
Availability indicates whether a time rule opens or closes the location.
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
Client defined unique id.
Global Location Number (GLN / ILN), e.g. “4314318377126”.
TDLinx store identifier.
Nielsen geographic marketing area.
Sales floor size in square metres.
Retail chain brand, e.g. “EDEKA”.
object
Read-only unique id.
Client defined unique id.
Distribution line / sub-chain, e.g. “EDEKA Nordbayern”.
object
Read-only unique id.
Client defined unique id.
Store owner / contract holder name.
object
Read-only unique id.
Client defined unique id.
object
IAB Ad Product categories that must not be served for every Device at this location.
Device represents a physical or virtual screen / sensor deployed in a retail location.
object
The metadata of the device.
object
The unique identifier for the resource.
The fully qualified name of the resource.
The name of the resource.
The timestamp when the resource was first created.
The timestamp when the resource was last updated.
The revision of the resource. Must be empty if the resource is not under version control.
object
The unique identifier for a particular revision of the resource.
The timestamp when this particular revision was created.
The unique identifier for the latest revision of the resource. Must be empty if this is already the latest revision.
The labels of the resource.
object
The fields to patch in the device.
The resource name of the location where this device is deployed.
object
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
Example 2: Pack and unpack a message in Java.
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
The 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”.
JSON
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:
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
If 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][]):
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}object
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one ”/” character. The last segment of the URL’s path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading ”.” is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
The zone identifier within the location.
object
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
Example 2: Pack and unpack a message in Java.
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
The 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”.
JSON
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:
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
If 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][]):
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}object
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one ”/” character. The last segment of the URL’s path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading ”.” is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
The type of this device.
The operational status of the device.
The deployment this device belongs to.
object
The allocation targets of the deployment.
AllocationTarget wraps the concrete allocation target types inside a Deployment.
object
Static is an allocation target that routes a fixed percentage of impressions to one or more ad or content servers (e.g. on-site / venue-sourced).
object
Share of impressions to allocate (0–100).
object
Identifier of the referenced AdServer entity.
object
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
Example 2: Pack and unpack a message in Java.
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
The 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”.
JSON
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:
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
If 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][]):
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}object
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one ”/” character. The last segment of the URL’s path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading ”.” is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
NonStatic is an allocation target that routes remaining percentage to internal SSP.
object
object
Identifier of the referenced AdServer entity.
object
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
Example 2: Pack and unpack a message in Java.
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
The 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”.
JSON
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:
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
If 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][]):
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}object
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one ”/” character. The last segment of the URL’s path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading ”.” is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
Supported Ad types maps ad type names (e.g. “promotion”, “display”) to their accepted formats.
SupportedAdType holds the list of accepted formats for one ad type slot.
object
object
Number of physical screens at this position.
Network operator / CMS partner that manages this device, e.g. “Viewento”.
Playout impression multipliers, per weekday and optional time range. Windows not covered by any rule default to a factor of 0.
ImpressionFactor sets the playout impression multiplier for a recurring weekly window. An unset start/end means it applies to the whole day.
object
Represents a day of the week.
- DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified.
- MONDAY: Monday
- TUESDAY: Tuesday
- WEDNESDAY: Wednesday
- THURSDAY: Thursday
- FRIDAY: Friday
- SATURDAY: Saturday
- SUNDAY: Sunday
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
IAB Ad Product categories that must not be served on this device.
Responses
Section titled “ Responses ”A successful response.
object
The outcome of upserting the location.
object
Location represents a retail store with its full operational profile.
object
The metadata of the location.
object
The unique identifier for the resource.
The fully qualified name of the resource.
The name of the resource.
The timestamp when the resource was first created.
The timestamp when the resource was last updated.
The revision of the resource. Must be empty if the resource is not under version control.
object
The unique identifier for a particular revision of the resource.
The timestamp when this particular revision was created.
The unique identifier for the latest revision of the resource. Must be empty if this is already the latest revision.
The labels of the resource.
object
The fields to update or to return in the location.
ISO 4217 currency codes, e.g. “EUR”.
BCP-47 language tags, e.g. [“de”, “en”].
The operational status of the location.
IANA timezone, e.g. “Europe/Berlin”.
object
DOOH venue classification (parent + child tiers from OpenOOH v1.2.1).
Named zones / aisles within the location.
Zone is a named area / aisle within a Location.
object
Read-only unique identifier.
Client defined unique id.
VenueRetailGroceryZone represents a zone within a grocery store.
object
Grandchild venue classification (ENTRANCE, CHECK_OUT, AISLES, EXTERIOR).
Product aisles within this zone (e.g., PRODUCE, DAIRY).
VenueRetailMallZone represents a zone within a mall store.
object
Grandchild venue classification (CONCOURSE, FOOD_COURT, SPECTACULAR).
GPS coordinates of the location.
object
The latitude in degrees. It must be in the range [-90.0, +90.0].
The longitude in degrees. It must be in the range [-180.0, +180.0].
Recurring weekly operating rules (open/closed windows per day).
WeeklyHours is a recurring weekly operating rule for a single day. An unset start/end means the rule applies to the whole day.
object
Represents a day of the week.
- DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified.
- MONDAY: Monday
- TUESDAY: Tuesday
- WEDNESDAY: Wednesday
- THURSDAY: Thursday
- FRIDAY: Friday
- SATURDAY: Saturday
- SUNDAY: Sunday
Availability indicates whether a time rule opens or closes the location.
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
Date-specific operating overrides (annual if year=0, otherwise one-off).
DateOverride is a date-specific operating rule. year=0 means it recurs annually; otherwise it is a one-off date. An unset start/end means the rule applies to the whole day.
object
- A full date, with non-zero year, month, and day values.
- A month and day, with a zero year (for example, an anniversary).
- A year on its own, with a zero month and a zero day.
- A year and month, with a zero day (for example, a credit card expiration date).
Related types:
- [google.type.TimeOfDay][google.type.TimeOfDay]
- [google.type.DateTime][google.type.DateTime]
- [google.protobuf.Timestamp][google.protobuf.Timestamp]
object
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn’t significant.
Availability indicates whether a time rule opens or closes the location.
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
Client defined unique id.
Global Location Number (GLN / ILN), e.g. “4314318377126”.
TDLinx store identifier.
Nielsen geographic marketing area.
Sales floor size in square metres.
Retail chain brand, e.g. “EDEKA”.
object
Read-only unique id.
Client defined unique id.
Distribution line / sub-chain, e.g. “EDEKA Nordbayern”.
object
Read-only unique id.
Client defined unique id.
Store owner / contract holder name.
object
Read-only unique id.
Client defined unique id.
object
IAB Ad Product categories that must not be served for every Device at this location.
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. Each Status message contains
three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the API Design Guide.
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
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 list of messages that carry the error details. There is a common set of message types for APIs to use.
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
Example 2: Pack and unpack a message in Java.
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
The 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”.
JSON
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:
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
If 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][]):
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}object
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one ”/” character. The last segment of the URL’s path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading ”.” is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
The outcome of upserting the device. When the location upsert fails the device is not attempted and its status reports FAILED_PRECONDITION.
object
Device represents a physical or virtual screen / sensor deployed in a retail location.
object
The metadata of the device.
object
The unique identifier for the resource.
The fully qualified name of the resource.
The name of the resource.
The timestamp when the resource was first created.
The timestamp when the resource was last updated.
The revision of the resource. Must be empty if the resource is not under version control.
object
The unique identifier for a particular revision of the resource.
The timestamp when this particular revision was created.
The unique identifier for the latest revision of the resource. Must be empty if this is already the latest revision.
The labels of the resource.
object
The fields to patch in the device.
The resource name of the location where this device is deployed.
object
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
Example 2: Pack and unpack a message in Java.
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
The 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”.
JSON
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:
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
If 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][]):
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}object
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one ”/” character. The last segment of the URL’s path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading ”.” is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
The zone identifier within the location.
object
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
Example 2: Pack and unpack a message in Java.
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
The 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”.
JSON
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:
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
If 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][]):
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}object
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one ”/” character. The last segment of the URL’s path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading ”.” is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
The type of this device.
The operational status of the device.
The deployment this device belongs to.
object
The allocation targets of the deployment.
AllocationTarget wraps the concrete allocation target types inside a Deployment.
object
Static is an allocation target that routes a fixed percentage of impressions to one or more ad or content servers (e.g. on-site / venue-sourced).
object
Share of impressions to allocate (0–100).
object
Identifier of the referenced AdServer entity.
object
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
Example 2: Pack and unpack a message in Java.
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
The 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”.
JSON
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:
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
If 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][]):
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}object
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one ”/” character. The last segment of the URL’s path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading ”.” is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
NonStatic is an allocation target that routes remaining percentage to internal SSP.
object
object
Identifier of the referenced AdServer entity.
object
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
Example 2: Pack and unpack a message in Java.
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
The 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”.
JSON
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:
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
If 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][]):
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}object
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one ”/” character. The last segment of the URL’s path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading ”.” is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
Supported Ad types maps ad type names (e.g. “promotion”, “display”) to their accepted formats.
SupportedAdType holds the list of accepted formats for one ad type slot.
object
object
Number of physical screens at this position.
Network operator / CMS partner that manages this device, e.g. “Viewento”.
Playout impression multipliers, per weekday and optional time range. Windows not covered by any rule default to a factor of 0.
ImpressionFactor sets the playout impression multiplier for a recurring weekly window. An unset start/end means it applies to the whole day.
object
Represents a day of the week.
- DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified.
- MONDAY: Monday
- TUESDAY: Tuesday
- WEDNESDAY: Wednesday
- THURSDAY: Thursday
- FRIDAY: Friday
- SATURDAY: Saturday
- SUNDAY: Sunday
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
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][google.type.Date] and
google.protobuf.Timestamp.
object
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value “24:00:00” for scenarios like business closing time.
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
IAB Ad Product categories that must not be served on this device.
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. Each Status message contains
three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the API Design Guide.
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
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 list of messages that carry the error details. There is a common set of message types for APIs to use.
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
Example 2: Pack and unpack a message in Java.
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
The 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”.
JSON
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:
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
If 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][]):
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}object
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one ”/” character. The last segment of the URL’s path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading ”.” is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
Example
{ "location": { "resource": { "status": "STATUS_UNSPECIFIED", "venue": "VENUE_UNSPECIFIED", "zones": [ { "retailGrocery": { "type": "VENUE_RETAIL_GROCERY_UNSPECIFIED", "aisles": [ "AISLE_UNSPECIFIED" ] }, "retailMall": { "type": "VENUE_RETAIL_MALLS_UNSPECIFIED" } } ], "weeklyHours": [ { "day": "DAY_OF_WEEK_UNSPECIFIED", "availability": "AVAILABILITY_UNSPECIFIED" } ], "dateOverrides": [ { "availability": "AVAILABILITY_UNSPECIFIED" } ], "nielsenArea": "NIELSEN_AREA_UNSPECIFIED", "excludedAdProducts": [ "AD_PRODUCT_UNSPECIFIED" ] } }, "device": { "resource": { "type": "DEVICE_TYPE_UNSPECIFIED", "status": "STATUS_UNSPECIFIED", "deployment": { "allocationTargets": [ { "nonStatic": { "balancePolicy": "AD_SERVER_BALANCE_POLICY_UNSPECIFIED" } } ] }, "supportedAdTypes": [ { "adType": "AD_TYPE_UNSPECIFIED" } ], "sensors": [ "SENSOR_UNSPECIFIED" ], "playoutImpressionFactors": [ { "day": "DAY_OF_WEEK_UNSPECIFIED" } ], "excludedAdProducts": [ "AD_PRODUCT_UNSPECIFIED" ] } }}default
Section titled “ default ”An unexpected error response.
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. Each Status message contains
three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the API Design Guide.
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
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 list of messages that carry the error details. There is a common set of message types for APIs to use.
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
Example 2: Pack and unpack a message in Java.
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
The 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”.
JSON
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:
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
If 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][]):
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}object
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one ”/” character. The last segment of the URL’s path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading ”.” is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
Examplegenerated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}