blob: 98e6d63007d18a4cc2cd19ac8c7d0cf7ea0fdba3 [file] [log] [blame]
// Copyright 2018 The Feed Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto2";
import "src/main/proto/search/now/wire/feed/action_type.proto";
package search.now.wire.feed;
option optimize_for=LITE_RUNTIME;
option java_package = "com.google.search.now.wire.feed";
option java_outer_classname = "FeedActionQueryDataProto";
// The combination of FeedActionQueryData and FeedActionQueryDataItem provide a
// transport format that can send each unique action, id, content domain, table,
// and semantic properties exactly once. This de-duplication allows the maximum
// amount of data to be sent from the client in the absence of compression.
// This data can then be mapped back into ContentId and SemanticProperties with
// high fidelity.
message FeedActionQueryData {
// The specific action that was performed on the client.
optional Action action = 1;
// A unique set of ids associated with the content.
repeated fixed64 unique_id = 2;
// A unique set of content domains associated with the content.
repeated string unique_content_domain = 3;
// A unique set of tables associated with the content.
repeated string unique_table = 4;
// The content that the action was performed on. The identity of the content
// can be created by combining unique_id, unique_content_domain, and
// unique_table.
repeated FeedActionQueryDataItem feed_action_query_data_item = 6;
reserved 5;
}
// Data describing the individual content that was acted upon.
message FeedActionQueryDataItem {
// An index into the unique_id field in FeedActionQueryData.
optional int32 id_index = 1;
// An index into the unique_content_domain field in FeedActionQueryData.
optional int32 content_domain_index = 2;
// An index into the unique_table field in FeedActionQueryData.
optional int32 table_index = 3;
// An index into the unique_semantic_properties field in FeedActionQueryData.
optional int32 semantic_properties_index = 4;
}
// Data describing the action that occurred on the client.
message Action {
// The specific action that was performed.
optional ActionType action_type = 1;
}