// Protocol Buffers - Google's data interchange format
// Copyright 2026 Google LLC.  All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

// Tests custom JSON string representation for enum values
// ((pb.enumvalue.json).string).
edition = "2026";

package com.google.protobuf.util.json_test_custom_enum_string;

import option "google/protobuf/json_options.proto";

option java_package = "com.google.protobuf.util.proto";

enum Armor {
  ARMOR_UNKNOWN = 0;
  ARMOR_GREAT_HELM = 1 [(pb.enumvalue.json).string = "gr8 helm"];
  ARMOR_GORGET = 2;
  ARMOR_GAUNTLET = 3 [(pb.enumvalue.json).string = "a\"b"];
  ARMOR_PLATE = 4 [(pb.enumvalue.json).string = "\"plate\""];
  ARMOR_COIF = 5 [(pb.enumvalue.json).string = ""];
  ARMOR_PAULDRON = 6 [(pb.enumvalue.json).string = "p\taul\ndron"];
  ARMOR_SHIELD = 7 [(pb.enumvalue.json).string = "true"];
  ARMOR_HACHI_MAI_DO = 8 [(pb.enumvalue.json).string = "8"];
}

enum Helmet {
  HELMET_UNKNOWN = 0;
  HELMET_GOBLIN = 1 [(pb.enumvalue.json) = {}];
}

message Knight {
  Armor armor = 1;
  Helmet helmet = 2;
  repeated Armor armors = 3;
}
