Skip to content

Commit d66b7c9

Browse files
Update gRPC proto definitions
Generated by applying the patch produced by the protobuf-generation-test.yml test. Sample passing run of protobuf-generation-test.yml: https://unity-ci.cds.internal.unity3d.com/job/34891270/logs
1 parent a72fb2f commit d66b7c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2659
-2255
lines changed

com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentAction.cs

+86-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Generated by the protocol buffer compiler. DO NOT EDIT!
33
// source: mlagents_envs/communicator_objects/agent_action.proto
44
// </auto-generated>
5-
#pragma warning disable 1591, 0612, 3021
5+
#pragma warning disable 1591, 0612, 3021, 8981
66
#region Designer generated code
77

88
using pb = global::Google.Protobuf;
@@ -32,38 +32,48 @@ static AgentActionReflection() {
3232
"VW5pdHkuTUxBZ2VudHMuQ29tbXVuaWNhdG9yT2JqZWN0c2IGcHJvdG8z"));
3333
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
3434
new pbr::FileDescriptor[] { },
35-
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
36-
new pbr::GeneratedClrTypeInfo(typeof(global::Unity.MLAgents.CommunicatorObjects.AgentActionProto), global::Unity.MLAgents.CommunicatorObjects.AgentActionProto.Parser, new[]{ "VectorActionsDeprecated", "Value", "ContinuousActions", "DiscreteActions" }, null, null, null)
35+
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
36+
new pbr::GeneratedClrTypeInfo(typeof(global::Unity.MLAgents.CommunicatorObjects.AgentActionProto), global::Unity.MLAgents.CommunicatorObjects.AgentActionProto.Parser, new[]{ "VectorActionsDeprecated", "Value", "ContinuousActions", "DiscreteActions" }, null, null, null, null)
3737
}));
3838
}
3939
#endregion
4040

4141
}
4242
#region Messages
43-
internal sealed partial class AgentActionProto : pb::IMessage<AgentActionProto> {
43+
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
44+
internal sealed partial class AgentActionProto : pb::IMessage<AgentActionProto>
45+
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
46+
, pb::IBufferMessage
47+
#endif
48+
{
4449
private static readonly pb::MessageParser<AgentActionProto> _parser = new pb::MessageParser<AgentActionProto>(() => new AgentActionProto());
4550
private pb::UnknownFieldSet _unknownFields;
4651
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
52+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
4753
public static pb::MessageParser<AgentActionProto> Parser { get { return _parser; } }
4854

4955
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
56+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
5057
public static pbr::MessageDescriptor Descriptor {
5158
get { return global::Unity.MLAgents.CommunicatorObjects.AgentActionReflection.Descriptor.MessageTypes[0]; }
5259
}
5360

5461
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
62+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
5563
pbr::MessageDescriptor pb::IMessage.Descriptor {
5664
get { return Descriptor; }
5765
}
5866

5967
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
68+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
6069
public AgentActionProto() {
6170
OnConstruction();
6271
}
6372

6473
partial void OnConstruction();
6574

6675
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
76+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
6777
public AgentActionProto(AgentActionProto other) : this() {
6878
vectorActionsDeprecated_ = other.vectorActionsDeprecated_.Clone();
6979
value_ = other.value_;
@@ -73,6 +83,7 @@ public AgentActionProto(AgentActionProto other) : this() {
7383
}
7484

7585
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
86+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
7687
public AgentActionProto Clone() {
7788
return new AgentActionProto(this);
7889
}
@@ -86,6 +97,7 @@ public AgentActionProto Clone() {
8697
/// mark as deprecated in communicator v1.3.0
8798
/// </summary>
8899
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
100+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
89101
public pbc::RepeatedField<float> VectorActionsDeprecated {
90102
get { return vectorActionsDeprecated_; }
91103
}
@@ -94,6 +106,7 @@ public AgentActionProto Clone() {
94106
public const int ValueFieldNumber = 4;
95107
private float value_;
96108
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
109+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
97110
public float Value {
98111
get { return value_; }
99112
set {
@@ -107,6 +120,7 @@ public float Value {
107120
= pb::FieldCodec.ForFloat(50);
108121
private readonly pbc::RepeatedField<float> continuousActions_ = new pbc::RepeatedField<float>();
109122
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
123+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
110124
public pbc::RepeatedField<float> ContinuousActions {
111125
get { return continuousActions_; }
112126
}
@@ -117,16 +131,19 @@ public float Value {
117131
= pb::FieldCodec.ForInt32(58);
118132
private readonly pbc::RepeatedField<int> discreteActions_ = new pbc::RepeatedField<int>();
119133
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
134+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
120135
public pbc::RepeatedField<int> DiscreteActions {
121136
get { return discreteActions_; }
122137
}
123138

124139
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
140+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
125141
public override bool Equals(object other) {
126142
return Equals(other as AgentActionProto);
127143
}
128144

129145
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
146+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
130147
public bool Equals(AgentActionProto other) {
131148
if (ReferenceEquals(other, null)) {
132149
return false;
@@ -142,6 +159,7 @@ public bool Equals(AgentActionProto other) {
142159
}
143160

144161
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
162+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
145163
public override int GetHashCode() {
146164
int hash = 1;
147165
hash ^= vectorActionsDeprecated_.GetHashCode();
@@ -155,12 +173,17 @@ public override int GetHashCode() {
155173
}
156174

157175
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
176+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
158177
public override string ToString() {
159178
return pb::JsonFormatter.ToDiagnosticString(this);
160179
}
161180

162181
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
182+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
163183
public void WriteTo(pb::CodedOutputStream output) {
184+
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
185+
output.WriteRawMessage(this);
186+
#else
164187
vectorActionsDeprecated_.WriteTo(output, _repeated_vectorActionsDeprecated_codec);
165188
if (Value != 0F) {
166189
output.WriteRawTag(37);
@@ -171,9 +194,28 @@ public void WriteTo(pb::CodedOutputStream output) {
171194
if (_unknownFields != null) {
172195
_unknownFields.WriteTo(output);
173196
}
197+
#endif
174198
}
175199

200+
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
176201
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
202+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
203+
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
204+
vectorActionsDeprecated_.WriteTo(ref output, _repeated_vectorActionsDeprecated_codec);
205+
if (Value != 0F) {
206+
output.WriteRawTag(37);
207+
output.WriteFloat(Value);
208+
}
209+
continuousActions_.WriteTo(ref output, _repeated_continuousActions_codec);
210+
discreteActions_.WriteTo(ref output, _repeated_discreteActions_codec);
211+
if (_unknownFields != null) {
212+
_unknownFields.WriteTo(ref output);
213+
}
214+
}
215+
#endif
216+
217+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
218+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
177219
public int CalculateSize() {
178220
int size = 0;
179221
size += vectorActionsDeprecated_.CalculateSize(_repeated_vectorActionsDeprecated_codec);
@@ -189,6 +231,7 @@ public int CalculateSize() {
189231
}
190232

191233
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
234+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
192235
public void MergeFrom(AgentActionProto other) {
193236
if (other == null) {
194237
return;
@@ -203,7 +246,11 @@ public void MergeFrom(AgentActionProto other) {
203246
}
204247

205248
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
249+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
206250
public void MergeFrom(pb::CodedInputStream input) {
251+
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
252+
input.ReadRawMessage(this);
253+
#else
207254
uint tag;
208255
while ((tag = input.ReadTag()) != 0) {
209256
switch(tag) {
@@ -231,7 +278,42 @@ public void MergeFrom(pb::CodedInputStream input) {
231278
}
232279
}
233280
}
281+
#endif
282+
}
283+
284+
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
285+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
286+
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
287+
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
288+
uint tag;
289+
while ((tag = input.ReadTag()) != 0) {
290+
switch(tag) {
291+
default:
292+
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
293+
break;
294+
case 10:
295+
case 13: {
296+
vectorActionsDeprecated_.AddEntriesFrom(ref input, _repeated_vectorActionsDeprecated_codec);
297+
break;
298+
}
299+
case 37: {
300+
Value = input.ReadFloat();
301+
break;
302+
}
303+
case 50:
304+
case 53: {
305+
continuousActions_.AddEntriesFrom(ref input, _repeated_continuousActions_codec);
306+
break;
307+
}
308+
case 58:
309+
case 56: {
310+
discreteActions_.AddEntriesFrom(ref input, _repeated_discreteActions_codec);
311+
break;
312+
}
313+
}
314+
}
234315
}
316+
#endif
235317

236318
}
237319

0 commit comments

Comments
 (0)