Media CAS Proxy SDK release: 16.5.0

This commit is contained in:
Buildbot
2021-07-12 21:46:29 +00:00
parent 760d53c347
commit d69222d492
1968 changed files with 638006 additions and 0 deletions

View File

@@ -0,0 +1,114 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package proto_util_converter.testing;
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
// Top-level test cases proto used by MarshallingTest. See description
// at the top of the class MarshallingTest for details on how to write
// test cases.
message AnyTestCases {
AnyWrapper empty_any = 1;
AnyWrapper type_only_any = 2;
AnyWrapper wrapper_any = 3;
AnyWrapper any_with_timestamp_value = 4;
AnyWrapper any_with_duration_value = 5;
AnyWrapper any_with_struct_value = 6;
AnyWrapper recursive_any = 7;
AnyWrapper any_with_message_value = 8;
AnyWrapper any_with_nested_message = 9;
AnyWrapper any_with_message_with_wrapper_type = 10;
AnyWrapper any_with_message_with_timestamp = 11;
AnyWrapper any_with_message_containing_map = 12;
AnyWrapper any_with_message_containing_struct = 13;
AnyWrapper any_with_message_containing_repeated_message = 14;
AnyWrapper recursive_any_with_type_field_at_end = 15;
AnyWrapper repeated_any = 16;
AnyWrapper empty_any_with_null_type_url = 17;
google.protobuf.Any top_level_any = 50;
google.protobuf.Any top_level_any_with_type_field_at_end = 51;
google.protobuf.Any top_level_any_with_pivot_one = 52;
google.protobuf.Any top_level_any_with_pivot_two = 53;
google.protobuf.Any top_level_any_unordered = 54;
}
message AnyWrapper {
google.protobuf.Any any = 1;
}
// Hack to make sure the types we put into the any are included in the types.
// Real solution is to add these types to the service config.
message Imports {
google.protobuf.DoubleValue dbl = 1;
google.protobuf.Struct struct = 2;
google.protobuf.Timestamp timestamp = 3;
google.protobuf.Duration duration = 4;
google.protobuf.Int32Value i32 = 5;
Data data = 100;
}
message Data {
int32 attr = 1;
string str = 2;
repeated string msgs = 3;
Data nested_data = 4;
google.protobuf.Int32Value int_wrapper = 5;
google.protobuf.Timestamp time = 6;
map<string, string> map_data = 7;
google.protobuf.Struct struct_data = 8;
repeated Data repeated_data = 9;
repeated google.protobuf.Any repeated_any = 10;
}
service AnyTestService {
rpc Call(AnyTestCases) returns (AnyTestCases);
rpc Call1(Imports) returns (Imports);
}
message AnyIn {
string something = 1;
google.protobuf.Any any = 2;
}
message AnyOut {
google.protobuf.Any any = 1;
}
message AnyM {
string foo = 1;
}

View File

@@ -0,0 +1,251 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Author: sven@google.com (Sven Mawson)
//
// Sample protos for testing.
// Some of the older enums don't use CAPITALS_WITH_UNDERSCORES for testing.
// LINT: LEGACY_NAMES
// LINT: ALLOW_GROUPS
syntax = "proto2";
package proto_util_converter.testing;
import "google/protobuf/util/internal/testdata/anys.proto";
// A book
message Book {
optional string title = 1;
optional Author author = 2;
optional uint32 length = 3;
optional int64 published = 4;
optional bytes content = 5;
optional group Data = 6 {
optional uint32 year = 7;
optional string copyright = 8;
}
message Label {
optional string key = 1;
optional string value = 2;
}
optional Publisher publisher = 9;
repeated Label labels = 10;
enum Type {
FICTION = 1;
KIDS = 2;
ACTION_AND_ADVENTURE = 3;
arts_and_photography = 4;
I18N_Tech = 5;
}
optional Type type = 11;
// Useful for testing JSON snake/camel-case conversions.
optional string snake_field = 12;
// Used to test type not found in type info. Messages defined in other files
// are not added when adding Book to type info.
optional AnyWrapper type_not_found = 13;
// Used to test invalid value inside of primitive repeated fields.
repeated int32 primitive_repeated = 14;
extensions 200 to 499;
}
// A publisher of a book, tests required fields.
message Publisher {
required string name = 1;
}
// An author of a book
message Author {
optional uint64 id = 1 [json_name = "@id"];
optional string name = 2;
repeated string pseudonym = 3;
optional bool alive = 4;
repeated Author friend = 5;
}
// For testing resiliency of our protostream parser.
// Field numbers of Author are reused for something else.
message BadAuthor {
optional string id = 1; // non-length-delimited to length-delimited.
repeated uint64 name = 2; // string to repeated (both length-delimited).
optional string pseudonym = 3; // Repeated to optional.
repeated bool alive = 4 [packed = true]; // Optional to repeated.
}
// All primitive types
message Primitive {
// 32 bit numbers:
optional fixed32 fix32 = 1;
optional uint32 u32 = 2;
optional int32 i32 = 3;
optional sfixed32 sf32 = 4;
optional sint32 s32 = 5;
// 64 bit numbers:
optional fixed64 fix64 = 6;
optional uint64 u64 = 7;
optional int64 i64 = 8;
optional sfixed64 sf64 = 9;
optional sint64 s64 = 10;
// The other stuff.
optional string str = 11;
optional bytes bytes = 12;
optional float float = 13;
optional double double = 14;
optional bool bool = 15;
// repeated 32 bit numbers:
repeated fixed32 rep_fix32 = 16;
repeated uint32 rep_u32 = 17;
repeated int32 rep_i32 = 18;
repeated sfixed32 rep_sf32 = 19;
repeated sint32 rep_s32 = 20;
// repeated 64 bit numbers:
repeated fixed64 rep_fix64 = 21;
repeated uint64 rep_u64 = 22;
repeated int64 rep_i64 = 23;
repeated sfixed64 rep_sf64 = 24;
repeated sint64 rep_s64 = 25;
// repeated other stuff:
repeated string rep_str = 26;
repeated bytes rep_bytes = 27;
repeated float rep_float = 28;
repeated double rep_double = 29;
repeated bool rep_bool = 30;
}
// Test packed versions of all repeated primitives.
// The field numbers should match their non-packed version in Primitive message.
message PackedPrimitive {
// repeated 32 bit numbers:
repeated fixed32 rep_fix32 = 16 [packed = true];
repeated uint32 rep_u32 = 17 [packed = true];
repeated int32 rep_i32 = 18 [packed = true];
repeated sfixed32 rep_sf32 = 19 [packed = true];
repeated sint32 rep_s32 = 20 [packed = true];
// repeated 64 bit numbers:
repeated fixed64 rep_fix64 = 21 [packed = true];
repeated uint64 rep_u64 = 22 [packed = true];
repeated int64 rep_i64 = 23 [packed = true];
repeated sfixed64 rep_sf64 = 24 [packed = true];
repeated sint64 rep_s64 = 25 [packed = true];
// repeated other stuff:
repeated float rep_float = 28 [packed = true];
repeated double rep_double = 29 [packed = true];
repeated bool rep_bool = 30 [packed = true];
}
// Test extensions.
extend Book {
repeated Author more_author = 201;
}
// Test nested extensions.
message NestedBook {
extend Book {
optional NestedBook another_book = 301;
}
// Recurse
optional Book book = 1;
}
// For testing resiliency of our protostream parser.
// Field number of NestedBook is reused for something else.
message BadNestedBook {
repeated uint32 book = 1 [packed = true]; // Packed to optional message.
}
// A recursively defined message.
message Cyclic {
optional int32 m_int = 1;
optional string m_str = 2;
optional Book m_book = 3;
repeated Author m_author = 5;
optional Cyclic m_cyclic = 4;
}
// Test that two messages can have different fields mapped to the same JSON
// name. See: https://github.com/protocolbuffers/protobuf/issues/1415
message TestJsonName1 {
optional int32 one_value = 1 [json_name = "value"];
}
message TestJsonName2 {
optional int32 another_value = 1 [json_name = "value"];
}
message TestPrimitiveFieldsWithSameJsonName {
optional string val_str1 = 1;
optional string val_str_1 = 2;
optional int32 val_int321 = 3;
optional int32 val_int32_1 = 4;
optional uint32 val_uint321 = 5;
optional uint32 val_uint32_1 = 6;
optional int64 val_int641 = 7;
optional int64 val_int64_1 = 8;
optional uint64 val_uint641 = 9;
optional uint64 val_uint64_1 = 10;
optional bool val_bool1 = 11;
optional bool val_bool_1 = 12;
optional double val_double1 = 13;
optional double val_double_1 = 14;
optional float val_float1 = 15;
optional float val_float_1 = 16;
}
message TestRepeatedFieldsWithSameJsonName {
repeated string rep_str1 = 1;
repeated string rep_str_1 = 2;
}
message TestMessageFieldsWithSameJsonName {
optional Primitive prim1 = 1;
optional Primitive prim_1 = 2;
}

View File

@@ -0,0 +1,170 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package proto_util_converter.testing;
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
message DefaultValueTestCases {
DoubleMessage empty_double = 1;
DoubleMessage double_with_default_value = 2;
DoubleMessage double_with_nondefault_value = 3;
DoubleMessage repeated_double = 4;
DoubleMessage nested_message = 5;
DoubleMessage repeated_nested_message = 6;
DoubleMessage double_message_with_oneof = 7;
StructMessage empty_struct = 201;
StructMessage empty_struct2 = 202;
StructMessage struct_with_null_value = 203;
StructMessage struct_with_values = 204;
StructMessage struct_with_nested_struct = 205;
StructMessage struct_with_nested_list = 206;
StructMessage struct_with_list_of_nulls = 207;
StructMessage struct_with_list_of_lists = 208;
StructMessage struct_with_list_of_structs = 209;
google.protobuf.Struct top_level_struct = 210;
ValueMessage value_wrapper_simple = 212;
ValueMessage value_wrapper_with_struct = 213;
ValueMessage value_wrapper_with_list = 214;
ListValueMessage list_value_wrapper = 215;
google.protobuf.Value top_level_value_simple = 216;
google.protobuf.Value top_level_value_with_struct = 217;
google.protobuf.Value top_level_value_with_list = 218;
google.protobuf.ListValue top_level_listvalue = 219;
AnyMessage empty_any = 301;
AnyMessage type_only_any = 302;
AnyMessage recursive_any = 303;
AnyMessage any_with_message_value = 304;
AnyMessage any_with_nested_message = 305;
AnyMessage any_with_message_containing_map = 306;
AnyMessage any_with_message_containing_struct = 307;
google.protobuf.Any top_level_any = 308;
StringtoIntMap empty_map = 401;
StringtoIntMap string_to_int = 402;
IntToStringMap int_to_string = 403;
MixedMap mixed1 = 404;
MixedMap2 mixed2 = 405;
MixedMap2 empty_mixed2 = 406;
MessageMap map_of_objects = 407;
MixedMap mixed_empty = 408;
MessageMap message_map_empty = 409;
DoubleValueMessage double_value = 501;
DoubleValueMessage double_value_default = 502;
}
message DoubleMessage {
double double_value = 1;
repeated double repeated_double = 2;
DoubleMessage nested_message = 3;
repeated DoubleMessage repeated_nested_message = 4;
google.protobuf.DoubleValue double_wrapper = 100;
oneof value {
string str_value = 112;
int64 num_value = 113;
}
}
message StructMessage {
google.protobuf.Struct struct = 1;
}
message ValueMessage {
google.protobuf.Value value = 1;
}
message ListValueMessage {
google.protobuf.ListValue shopping_list = 1;
}
message RequestMessage {
string content = 1;
}
// A test service.
service DefaultValueTestService {
// A test method.
rpc Call(RequestMessage) returns (DefaultValueTestCases);
}
message AnyMessage {
google.protobuf.Any any = 1;
AnyData data = 2;
}
message AnyData {
int32 attr = 1;
string str = 2;
repeated string msgs = 3;
AnyData nested_data = 4;
map<string, string> map_data = 7;
google.protobuf.Struct struct_data = 8;
repeated AnyData repeated_data = 9;
}
message StringtoIntMap {
map<string, int32> map = 1;
}
message IntToStringMap {
map<int32, string> map = 1;
}
message MixedMap {
string msg = 1;
map<string, float> map = 2;
int32 int_value = 3;
}
message MixedMap2 {
enum E {
E0 = 0;
E1 = 1;
E2 = 2;
E3 = 3;
}
map<int32, bool> map = 1;
E ee = 2;
string msg = 4;
}
message MessageMap {
message M {
int32 inner_int = 1;
string inner_text = 2;
}
map<string, M> map = 1;
}
message DoubleValueMessage {
google.protobuf.DoubleValue double = 1;
}

View File

@@ -0,0 +1,53 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package proto_util_converter.testing;
message DefaultValueTest {
double double_value = 1;
repeated double repeated_double = 2;
float float_value = 3;
int64 int64_value = 5;
uint64 uint64_value = 7;
int32 int32_value = 9;
uint32 uint32_value = 11;
bool bool_value = 13;
string string_value = 15;
bytes bytes_value = 17 [ctype = CORD];
enum EnumDefault {
ENUM_FIRST = 0;
ENUM_SECOND = 1;
ENUM_THIRD = 2;
}
EnumDefault enum_value = 18;
}

View File

@@ -0,0 +1,71 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package proto_util_converter.testing;
import "google/protobuf/field_mask.proto";
message NestedFieldMask {
string data = 1;
google.protobuf.FieldMask single_mask = 2;
repeated google.protobuf.FieldMask repeated_mask = 3;
}
message FieldMaskTest {
string id = 1;
google.protobuf.FieldMask single_mask = 2;
repeated google.protobuf.FieldMask repeated_mask = 3;
repeated NestedFieldMask nested_mask = 4;
}
message FieldMaskTestCases {
FieldMaskWrapper single_mask = 1;
FieldMaskWrapper multiple_mask = 2;
FieldMaskWrapper snake_camel = 3;
FieldMaskWrapper empty_field = 4;
FieldMaskWrapper apiary_format1 = 5;
FieldMaskWrapper apiary_format2 = 6;
FieldMaskWrapper apiary_format3 = 7;
FieldMaskWrapper map_key1 = 8;
FieldMaskWrapper map_key2 = 9;
FieldMaskWrapper map_key3 = 10;
FieldMaskWrapper map_key4 = 11;
FieldMaskWrapper map_key5 = 12;
}
message FieldMaskWrapper {
google.protobuf.FieldMask mask = 1;
}
service FieldMaskTestService {
rpc Call(FieldMaskTestCases) returns (FieldMaskTestCases);
}

View File

@@ -0,0 +1,148 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package proto_util_converter.testing;
import "google/protobuf/any.proto";
// Top-level test cases proto used by MarshallingTest. See description
// at the top of the class MarshallingTest for details on how to write
// test cases.
message MapsTestCases {
EmptyMap empty_map = 1;
StringtoInt string_to_int = 2;
IntToString int_to_string = 3;
Mixed1 mixed1 = 4;
Mixed2 mixed2 = 5;
MapOfObjects map_of_objects = 6;
// Empty key tests
StringtoInt empty_key_string_to_int1 = 7;
StringtoInt empty_key_string_to_int2 = 8;
StringtoInt empty_key_string_to_int3 = 9;
BoolToString empty_key_bool_to_string = 10;
IntToString empty_key_int_to_string = 11;
Mixed1 empty_key_mixed = 12;
MapOfObjects empty_key_map_objects = 13;
}
message EmptyMap {
map<int32, int32> map = 1;
}
message StringtoInt {
map<string, int32> map = 1;
}
message IntToString {
map<int32, string> map = 1;
}
message BoolToString {
map<bool, string> map = 1;
}
message Mixed1 {
string msg = 1;
map<string, float> map = 2;
}
message Mixed2 {
enum E {
E0 = 0;
E1 = 1;
E2 = 2;
E3 = 3;
}
map<int32, bool> map = 1;
E ee = 2;
}
message MapOfObjects {
message M {
string inner_text = 1;
}
map<string, M> map = 1;
}
message DummyRequest {}
service MapsTestService {
rpc Call(DummyRequest) returns (MapsTestCases);
}
message MapIn {
string other = 1;
repeated string things = 2;
map<string, string> map_input = 3;
map<string, google.protobuf.Any> map_any = 4;
}
message MapOut {
map<string, MapM> map1 = 1;
map<string, MapOut> map2 = 2;
map<int32, string> map3 = 3;
map<bool, string> map4 = 5;
string bar = 4;
}
// A message with exactly the same wire representation as MapOut, but using
// repeated message fields instead of map fields. We use this message to test
// the wire-format compatibility of the JSON transcoder (e.g., whether it
// handles missing keys correctly).
message MapOutWireFormat {
message Map1Entry {
string key = 1;
MapM value = 2;
}
repeated Map1Entry map1 = 1;
message Map2Entry {
string key = 1;
MapOut value = 2;
}
repeated Map2Entry map2 = 2;
message Map3Entry {
int32 key = 1;
string value = 2;
}
repeated Map3Entry map3 = 3;
message Map4Entry {
bool key = 1;
string value = 2;
}
repeated Map4Entry map4 = 5;
string bar = 4;
}
message MapM {
string foo = 1;
}

View File

@@ -0,0 +1,77 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Proto to test proto3 oneofs.
syntax = "proto3";
package proto_util_converter.testing.oneofs;
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
message OneOfsRequest {
string value = 1;
oneof data {
string str_data = 2;
int32 int_data = 3;
// Simple message
Data message_data = 4;
MoreData more_data = 5;
// Well known types
google.protobuf.Struct struct_data = 6;
google.protobuf.Value value_data = 7;
google.protobuf.ListValue list_value_data = 8;
google.protobuf.Timestamp ts_data = 9;
}
google.protobuf.Any any_data = 19;
}
message RequestWithSimpleOneof {
string value = 1;
oneof data {
string str_data = 2;
int32 int_data = 3;
Data message_data = 4;
MoreData more_data = 5;
}
}
message Data {
int32 data_value = 1;
}
message MoreData {
string str_value = 1;
}
message Response {
string value = 1;
}

View File

@@ -0,0 +1,42 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package proto_util_converter.testing;
message Proto3Message {
enum NestedEnum {
FOO = 0;
BAR = 1;
BAZ = 2;
}
NestedEnum enum_value = 1;
}

View File

@@ -0,0 +1,117 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package proto_util_converter.testing;
import "google/protobuf/struct.proto";
message StructTestCases {
StructWrapper empty_value = 1;
StructWrapper empty_value2 = 2;
StructWrapper null_value = 3;
StructWrapper simple_struct = 4;
StructWrapper longer_struct = 5;
StructWrapper struct_with_nested_struct = 6;
StructWrapper struct_with_nested_list = 7;
StructWrapper struct_with_list_of_nulls = 8;
StructWrapper struct_with_list_of_lists = 9;
StructWrapper struct_with_list_of_structs = 10;
StructWrapper struct_with_empty_list = 11;
StructWrapper struct_with_list_with_empty_struct = 12;
google.protobuf.Struct top_level_struct = 13;
google.protobuf.Struct top_level_struct_with_empty_list = 14;
google.protobuf.Struct top_level_struct_with_list_with_empty_struct = 15;
ValueWrapper value_wrapper_simple = 16;
ValueWrapper value_wrapper_with_struct = 17;
ValueWrapper value_wrapper_with_list = 18;
ValueWrapper value_wrapper_with_empty_list = 19;
ValueWrapper value_wrapper_with_list_with_empty_struct = 20;
ListValueWrapper list_value_wrapper = 21;
ListValueWrapper list_value_wrapper_with_empty_list = 22;
ListValueWrapper list_value_wrapper_with_list_with_empty_struct = 23;
google.protobuf.Value top_level_value_simple = 24;
google.protobuf.Value top_level_value_with_struct = 25;
google.protobuf.Value top_level_value_with_list = 26;
google.protobuf.Value top_level_value_with_empty_list = 27;
google.protobuf.Value top_level_value_with_list_with_empty_struct = 28;
google.protobuf.ListValue top_level_listvalue = 29;
google.protobuf.ListValue top_level_empty_listvalue = 30;
google.protobuf.ListValue top_level_listvalue_with_empty_struct = 31;
RepeatedValueWrapper repeated_value = 32;
RepeatedValueWrapper repeated_value_nested_list = 33;
RepeatedValueWrapper repeated_value_nested_list2 = 34;
RepeatedValueWrapper repeated_value_nested_list3 = 35;
RepeatedListValueWrapper repeated_listvalue = 36;
MapOfStruct map_of_struct = 37;
MapOfStruct map_of_struct_value = 38;
MapOfStruct map_of_listvalue = 39;
}
message StructWrapper {
google.protobuf.Struct struct = 1;
}
message ValueWrapper {
google.protobuf.Value value = 1;
}
message RepeatedValueWrapper {
repeated google.protobuf.Value values = 1;
}
message ListValueWrapper {
google.protobuf.ListValue shopping_list = 1;
}
message RepeatedListValueWrapper {
repeated google.protobuf.ListValue dimensions = 1;
}
message MapOfStruct {
map<string, google.protobuf.Struct> struct_map = 1;
map<string, google.protobuf.Value> value_map = 2;
map<string, google.protobuf.ListValue> listvalue_map = 3;
}
// Hack to test return types with Struct as top-level message. Struct typers
// cannot be directly used in API requests. Hence using Dummy as request type.
message Dummy {
string text = 1;
}
service StructTestService {
rpc Call(Dummy) returns (StructTestCases);
}
message StructType {
google.protobuf.Struct object = 1;
}

View File

@@ -0,0 +1,80 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package proto_util_converter.testing;
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
message TimestampDurationTestCases {
// Timestamp tests
TimeStampType epoch = 1;
TimeStampType epoch2 = 2;
TimeStampType mintime = 3;
TimeStampType maxtime = 4;
TimeStampType timeval1 = 5;
TimeStampType timeval2 = 6;
TimeStampType timeval3 = 7;
TimeStampType timeval4 = 8;
TimeStampType timeval5 = 9;
TimeStampType timeval6 = 10;
TimeStampType timeval7 = 11;
google.protobuf.Timestamp timeval8 = 12;
// Duration tests
DurationType zero_duration = 101;
DurationType min_duration = 102;
DurationType max_duration = 103;
DurationType duration1 = 104;
DurationType duration2 = 105;
DurationType duration3 = 106;
DurationType duration4 = 107;
google.protobuf.Duration duration5 = 108;
}
message TimeStampType {
google.protobuf.Timestamp timestamp = 1;
}
message DurationType {
google.protobuf.Duration duration = 1;
}
service TimestampDurationTestService {
rpc Call(TimestampDurationTestCases) returns (TimestampDurationTestCases);
}
message TimestampDuration {
google.protobuf.Timestamp ts = 1;
google.protobuf.Duration dur = 2;
repeated google.protobuf.Timestamp rep_ts = 3;
}

View File

@@ -0,0 +1,100 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package proto_util_converter.testing;
import "google/protobuf/wrappers.proto";
// Top-level test cases proto used by MarshallingTest. See description
// at the top of the class MarshallingTest for details on how to write
// test cases.
message WrappersTestCases {
DoubleWrapper double_wrapper = 1;
FloatWrapper float_wrapper = 2;
Int64Wrapper int64_wrapper = 3;
UInt64Wrapper uint64_wrapper = 4;
Int32Wrapper int32_wrapper = 5;
UInt32Wrapper uint32_wrapper = 6;
BoolWrapper bool_wrapper = 7;
StringWrapper string_wrapper = 8;
BytesWrapper bytes_wrapper = 9;
DoubleWrapper double_wrapper_default = 10;
FloatWrapper float_wrapper_default = 11;
Int64Wrapper int64_wrapper_default = 12;
UInt64Wrapper uint64_wrapper_default = 13;
Int32Wrapper int32_wrapper_default = 14;
UInt32Wrapper uint32_wrapper_default = 15;
BoolWrapper bool_wrapper_default = 16;
StringWrapper string_wrapper_default = 17;
BytesWrapper bytes_wrapper_default = 18;
}
message DoubleWrapper {
google.protobuf.DoubleValue double = 1;
}
message FloatWrapper {
google.protobuf.FloatValue float = 1;
}
message Int64Wrapper {
google.protobuf.Int64Value int64 = 1;
}
message UInt64Wrapper {
google.protobuf.UInt64Value uint64 = 1;
}
message Int32Wrapper {
google.protobuf.Int32Value int32 = 1;
}
message UInt32Wrapper {
google.protobuf.UInt32Value uint32 = 1;
}
message BoolWrapper {
google.protobuf.BoolValue bool = 1;
}
message StringWrapper {
google.protobuf.StringValue string = 1;
}
message BytesWrapper {
google.protobuf.BytesValue bytes = 1;
}
service WrappersTestService {
rpc Call(WrappersTestCases) returns (WrappersTestCases);
}