blob: cd52a512e2078942fbdb96c3afb84ed01fdcd87d [file] [log] [blame]
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you 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.
//
// Account Data data structures. These are used as the on-disk representation of the internal
// AccountData classes.
//
// Author: tad.glines@gmail.com (Tad Glines)
syntax = "proto2";
package protoaccountstore;
option java_package = "org.waveprotocol.box.server.persistence.protos";
option java_outer_classname = "ProtoAccountStoreData";
// Represents an AccountData instance
message ProtoAccountData {
enum AccountDataType {
HUMAN_ACCOUNT = 1;
ROBOT_ACCOUNT = 2;
}
required AccountDataType account_type = 1;
// The participant id
required string account_id = 2;
// One must be provided depending on the value of account_type.
optional ProtoHumanAccountData human_account_data = 3;
optional ProtoRobotAccountData robot_account_data = 4;
}
// Data specific to a human account
message ProtoHumanAccountData {
optional ProtoPasswordDigest password_digest = 1;
}
// The values from a PAsswordDigest instance
message ProtoPasswordDigest {
required bytes salt = 1;
required bytes digest = 2;
}
// Data specific to a robot account
message ProtoRobotAccountData {
required string url = 1;
required string consumer_secret = 2;
optional ProtoRobotCapabilities robot_capabilities = 3;
required bool is_verified = 4;
}
// Data found in a RobotCapabilities instance
message ProtoRobotCapabilities {
required string capabilities_hash = 1;
required string protocol_version = 2;
repeated ProtoRobotCapability capability = 3;
}
// Data found in a com.google.api.robot.Capability instance
message ProtoRobotCapability {
required string event_type = 1;
repeated string context = 2;
required string filter = 3;
}