/**
 * 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.
 */
syntax = "proto2";

package pulsar.schema;
option java_package = "org.apache.pulsar.broker.service.schema.proto";
option optimize_for = SPEED;

message SchemaInfo {
    enum SchemaType {
        NONE = 1;
        STRING = 2;
        JSON = 3;
        PROTOBUF = 4;
        AVRO = 5;
        BOOLEAN = 6;
        INT8 = 7;
        INT16 = 8;
        INT32 = 9;
        INT64 = 10;
        FLOAT = 11;
        DOUBLE = 12;
        DATE = 13;
        TIME = 14;
        TIMESTAMP = 15;
        KEYVALUE = 16;
        INSTANT = 17;
        LOCALDATE = 18;
        LOCALTIME = 19;
        LOCALDATETIME = 20;
        PROTOBUFNATIVE = 21;
    }
    message KeyValuePair {
        required string key = 1;
        required string value = 2;
    }
    required string schema_id = 1;
    required string user = 2;
    required SchemaType type = 3;
    required bytes schema = 4;
    required int64 timestamp = 5;
    required bool deleted = 6;

    repeated KeyValuePair props = 7;
}
