1// Copyright 2019 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto2"; 16 17package icing.lib; 18 19import "icing/proto/status.proto"; 20 21option java_package = "com.google.android.icing.proto"; 22option java_multiple_files = true; 23option objc_class_prefix = "ICNG"; 24 25// Representation of a usage report that is generated from the client and sent 26// to Icing. 27// Next tag: 5 28message UsageReport { 29 // Namespace of the document. 30 optional string document_namespace = 1; 31 32 // Uri of the document. 33 optional string document_uri = 2; 34 35 // Timestamp in milliseconds of when the usage happens. 36 optional int64 usage_timestamp_ms = 3; 37 38 // LINT.IfChange 39 // Next tag: 3 40 enum UsageType { 41 // A custom usage type that clients can assign a meaning to. UsageReports of 42 // the same type are combined to provide usage counts that clients may use 43 // in scoring. 44 USAGE_TYPE1 = 0; 45 46 // Same as above. 47 USAGE_TYPE2 = 1; 48 49 // Same as above. 50 USAGE_TYPE3 = 2; 51 } 52 // LINT.ThenChange( 53 // //depot/google3/icing/store/usage-store.h:UsageScores, 54 // //depot/google3/icing/proto/\ 55 // storage.proto:namespace_storage_info_usage_types) 56 optional UsageType usage_type = 4; 57} 58 59// Result of a call to IcingSearchEngine.ReportUsage 60// Next tag: 2 61message ReportUsageResultProto { 62 // Status code can be one of: 63 // OK 64 // NOT_FOUND 65 // INTERNAL 66 // 67 // See status.proto for more details. 68 optional StatusProto status = 1; 69} 70