// 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;

// A test message for `enum` fields.
message MessageWithEnum {
  // A singular field.
  TestEnum singular = 1;
  // An optional field.
  optional TestEnum optional = 2;
  // A repeated field.
  repeated TestEnum repeated = 3;
  // A map field, enums cannot be keys. We only need to test them as values.
  map<string, TestEnum> map = 4;

  // The enum type
  enum TestEnum {
    // Open enums require a default value of `0`.
    TEST_ENUM_UNSPECIFIED = 0;
    // A test value.
    RED = 1;
    // A test value.
    GREEN = 2;
    // A test value.
    BLUE = 3;
  }
}
