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

     1  // Copyright 2022 The LUCI Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // vim: noexpandtab
    16  
    17  syntax = "proto3";
    18  
    19  package reflectutil;
    20  
    21  option go_package = "go.chromium.org/luci/common/proto/reflectutil;reflectutil";
    22  
    23  message TestMapMessage {
    24    map<bool,string> bool_map = 1;
    25  
    26    map<int32,string> int32_map = 2;
    27    map<int64,string> int64_map = 3;
    28  
    29    map<uint32,string> uint32_map = 4;
    30    map<uint64,string> uint64_map = 5;
    31  
    32    map<string,string> string_map = 6;
    33  }
    34  
    35  message TestPathMessage {
    36    message Inner {
    37      string str = 1;
    38    }
    39  
    40    Inner single_inner = 1;
    41    map<string, Inner> map_inner = 2;
    42    map<int32, Inner> int_map_inner = 3;
    43    repeated Inner multi_inner = 4;
    44  }
    45  
    46  message TestShallowCopyMessage {
    47    message Inner {
    48      string field = 1;
    49    }
    50  
    51    string field = 1;
    52    repeated string repeated_field = 2;
    53    map<string, string> mapped_field = 3;
    54  
    55    Inner inner_msg = 4;
    56    repeated Inner repeated_msg = 5;
    57    map<string, Inner> mapped_msg = 6;
    58  }