// Copyright 2025 Google LLC
//
// 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
//
//     https://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 = "proto3";
package google.rust.sdk.test;

import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";

// A message with several interesting `oneof` fields.
message MessageWithOneOf {
  oneof single_string { string string_contents = 1; }
  oneof two_strings {
    string string_contents_one = 2;
    string string_contents_two = 3;
  }
  oneof one_message { Message message_value = 4; }
  oneof mixed {
    Message another_message = 5;
    string string = 6;
    google.protobuf.Duration duration = 7;
  }

  message Message { string parent = 1; }
}

// A message with a more complex `oneof` field.
message MessageWithComplexOneOf {
  oneof complex {
    google.protobuf.NullValue null = 1;
    bool bool_value = 2;
    bytes bytes_value = 3;
    string string_value = 4;
    float float_value = 5;
    double double_value = 6;
    int32 int32 = 7;
    int64 int64 = 8;
    TestEnum enum = 9;
    Inner inner = 10;
    google.protobuf.Duration duration = 11;
    google.protobuf.Value value = 12;
    google.protobuf.DoubleValue optional_double = 13;
  }

  enum TestEnum {
    TEST_ENUM_UNSPECIFIED = 0;
    BLACK = 1;
  }

  message Inner { repeated string strings = 1; }
}
