| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 syntax = "proto2"; | 5 syntax = "proto2"; |
| 6 | 6 |
| 7 package affiliation_pb; | 7 package affiliation_pb; |
| 8 | 8 |
| 9 option optimize_for = LITE_RUNTIME; | 9 option optimize_for = LITE_RUNTIME; |
| 10 | 10 |
| 11 // A collection of facets affiliated with each other, i.e. an equivalence class. | 11 // A collection of facets affiliated with each other, i.e. an equivalence class. |
| 12 message Affiliation { | 12 message Affiliation { |
| 13 repeated string facet = 1; | 13 repeated Facet facet = 1; |
| 14 } |
| 15 |
| 16 message Facet { |
| 17 // The URI of the facet. |
| 18 optional string id = 1; |
| 19 optional BrandingInfo branding_info = 2; |
| 20 } |
| 21 |
| 22 message BrandingInfo { |
| 23 optional string name = 1; |
| 24 optional string icon_url = 2; |
| 25 } |
| 26 |
| 27 // Specifies what additional information to return with the response. |
| 28 message LookupAffiliationMask { |
| 29 // Whether or not to fill |branding_info| for returned Facets. |
| 30 optional bool branding_info = 1; |
| 31 // The locale to use for |branding_info.name| for returned Facets. |
| 32 optional string locale = 2; |
| 14 } | 33 } |
| 15 | 34 |
| 16 // Encapsulates a lookup request to the Affiliation API. | 35 // Encapsulates a lookup request to the Affiliation API. |
| 17 message LookupAffiliationRequest { | 36 message LookupAffiliationRequest { |
| 18 // The facet URIs to query. | 37 // The facet URIs to query. |
| 19 repeated string facet = 1; | 38 repeated string facet = 1; |
| 39 optional LookupAffiliationMask mask = 2; |
| 20 } | 40 } |
| 21 | 41 |
| 22 // Encapsulates a lookup response from the the Affiliation API. | 42 // Encapsulates a lookup response from the the Affiliation API. |
| 23 message LookupAffiliationResponse { | 43 message LookupAffiliationResponse { |
| 24 // For each queried facet, the corresponding equivalence class, if any. | 44 // For each queried facet, the corresponding equivalence class, if any. |
| 25 repeated Affiliation affiliation = 1; | 45 repeated Affiliation affiliation = 1; |
| 26 } | 46 } |
| OLD | NEW |