blob: 8bfc55275b6afcf2dbb7b18a9e2fcd45fcd86be2 [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/feature.proto";
import "src/main/proto/search/now/wire/feed/payload_metadata.proto";
import "src/main/proto/search/now/ui/piet/piet.proto";
package search.now.wire.feed;
option optimize_for=LITE_RUNTIME;
option java_package = "com.google.search.now.wire.feed";
option java_outer_classname = "DataOperationProto";
// An extensible operation to change the state of data on the client.
message DataOperation {
enum Operation {
UNKNOWN_OPERATION = 0;
// Remove all stored content of all types
CLEAR_ALL = 1;
// Update content if it exists, else append to the bottom of the feed
UPDATE_OR_APPEND = 2;
// Remove the item from the stream
REMOVE = 3;
}
// The operation to perform on the data.
optional Operation operation = 1;
// Data common to all payload types.
optional PayloadMetadata metadata = 2;
// The actual data being supplied.
oneof payload {
// A stream UI level feature such as a cluster or card.
Feature feature = 3;
// Shared state for all Piet cards
search.now.ui.piet.PietSharedState piet_shared_state = 4;
}
}