blob: eeb7e8d02965216cdda2e65d02b73ab17816a211 [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.
syntax = "proto2";
package mesos.test;
// This file is only used by the HTTP.AsV1Protobuf test to
// ensure that the "slave" -> "agent" and "SLAVE" -> "AGENT"
// adjustments occur correctly in all cases.
//
// NOTE: This file is manually compiled and generated files
// included as source files, to simplify the build (rather
// than having the build generate the files as a dependency
// to compiling the tests).
//
// TODO(bmahler): We could do away with this file by having
// the test could dynamically generate the protobuf message
// schemas needed and using reflection to fill them in:
//
// DescriptorProto proto;
//
// proto.set_name("Message");
//
// FieldDescriptorProto* field = proto.add_field();
// field->set_name("str");
// field->set_type(FieldDescriptorProto::TYPE_STRING);
//
// const Descriptor* descriptor = proto.descriptor();
//
// DynamicMessageFactory factory;
// Message* message = factory.GetPrototype(descriptor);
//
// Reflection* message.getReflection();
message TestSlaveMessage {
optional bool some_slave_field = 1;
repeated bool some_slave_fields = 2;
map<bool, bool> some_slave_map = 3;
enum E { A_SLAVE_ENUM = 0; }
optional E some_slave_enum = 4;
repeated E some_slave_enums = 5;
}
message ParentMessage {
optional TestSlaveMessage some_slave_message = 1;
repeated TestSlaveMessage some_slave_messages = 2;
}