/*
 * 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 org.apache.fluss.protogen.tests;

// Message with circular reference - A references B, B references A
message CircularA {
  optional string name = 1;
  optional CircularB b_ref = 2;
}

message CircularB {
  optional int32 id = 1;
  optional CircularA a_ref = 2;
}

// Message with records field but no circular reference
message SimpleRecordsMessage {
  optional bytes records = 1;
  optional string metadata = 2;
}

// Message with circular reference that contains records field
message CircularRecordsA {
  optional bytes records = 1;
  optional CircularRecordsB nested = 2;
}

message CircularRecordsB {
  optional string info = 1;
  optional CircularRecordsA parent = 2;
}

// Complex circular reference with multiple levels
message ComplexA {
  optional string value = 1;
  optional ComplexB b = 2;
  optional ComplexC c = 3;
}

message ComplexB {
  optional int32 number = 1;
  optional ComplexA a = 2;
  optional bytes records = 3;
}

message ComplexC {
  optional bool flag = 1;
  optional ComplexA a = 2;
}
