go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/common/proto/msgpackpb/msg_test.proto (about)

     1  // Copyright 2022 The LUCI Authors. All rights reserved.
     2  // Use of this source code is governed under the Apache License, Version 2.0
     3  // that can be found in the LICENSE file.
     4  
     5  syntax = "proto3";
     6  
     7  import "google/protobuf/duration.proto";
     8  
     9  option go_package = "go.chromium.org/luci/common/proto/msgpackpb";
    10  
    11  package go.chromium.org.luci.common.proto.msgpackpb;
    12  
    13  enum VALUE {
    14    ZERO = 0;
    15    ONE = 1;
    16    TWO = 2;
    17  }
    18  
    19  message TestMessage {
    20    reserved 1; // this will allow easily creating messages with unknown fields.
    21  
    22    bool  boolval = 2;
    23    int64 intval = 3;
    24    uint64 uintval = 4;
    25    int32 short_intval = 5;
    26    uint32 short_uintval = 6;
    27    string strval = 7;
    28    double floatval = 8;
    29    float short_floatval = 9;
    30  
    31    VALUE value = 10;
    32  
    33    map<string, TestMessage> mapfield = 11;
    34  
    35    google.protobuf.Duration duration = 12;
    36  
    37    repeated string strings = 13;
    38    TestMessage single_recurse = 14;
    39    repeated TestMessage multi_recursion = 15;
    40  
    41    oneof choice {
    42      int32 intchoice = 16;
    43      string strchoice = 17;
    44    }
    45  }