ppo-Pyramids-Training / com.unity.ml-agents /Runtime /Grpc /CommunicatorObjects /UnityRlInitializationInput.cs
| // <auto-generated> | |
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |
| // source: mlagents_envs/communicator_objects/unity_rl_initialization_input.proto | |
| // </auto-generated> | |
| using pb = global::Google.Protobuf; | |
| using pbc = global::Google.Protobuf.Collections; | |
| using pbr = global::Google.Protobuf.Reflection; | |
| using scg = global::System.Collections.Generic; | |
| namespace Unity.MLAgents.CommunicatorObjects { | |
| /// <summary>Holder for reflection information generated from mlagents_envs/communicator_objects/unity_rl_initialization_input.proto</summary> | |
| internal static partial class UnityRlInitializationInputReflection { | |
| /// <summary>File descriptor for mlagents_envs/communicator_objects/unity_rl_initialization_input.proto</summary> | |
| public static pbr::FileDescriptor Descriptor { | |
| get { return descriptor; } | |
| } | |
| private static pbr::FileDescriptor descriptor; | |
| static UnityRlInitializationInputReflection() { | |
| byte[] descriptorData = global::System.Convert.FromBase64String( | |
| string.Concat( | |
| "CkZtbGFnZW50c19lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5X3Js", | |
| "X2luaXRpYWxpemF0aW9uX2lucHV0LnByb3RvEhRjb21tdW5pY2F0b3Jfb2Jq", | |
| "ZWN0cxo1bWxhZ2VudHNfZW52cy9jb21tdW5pY2F0b3Jfb2JqZWN0cy9jYXBh", | |
| "YmlsaXRpZXMucHJvdG8iwAEKH1VuaXR5UkxJbml0aWFsaXphdGlvbklucHV0", | |
| "UHJvdG8SDAoEc2VlZBgBIAEoBRIdChVjb21tdW5pY2F0aW9uX3ZlcnNpb24Y", | |
| "AiABKAkSFwoPcGFja2FnZV92ZXJzaW9uGAMgASgJEkQKDGNhcGFiaWxpdGll", | |
| "cxgEIAEoCzIuLmNvbW11bmljYXRvcl9vYmplY3RzLlVuaXR5UkxDYXBhYmls", | |
| "aXRpZXNQcm90bxIRCgludW1fYXJlYXMYBSABKAVCJaoCIlVuaXR5Lk1MQWdl", | |
| "bnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); | |
| descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, | |
| new pbr::FileDescriptor[] { global::Unity.MLAgents.CommunicatorObjects.CapabilitiesReflection.Descriptor, }, | |
| new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { | |
| new pbr::GeneratedClrTypeInfo(typeof(global::Unity.MLAgents.CommunicatorObjects.UnityRLInitializationInputProto), global::Unity.MLAgents.CommunicatorObjects.UnityRLInitializationInputProto.Parser, new[]{ "Seed", "CommunicationVersion", "PackageVersion", "Capabilities", "NumAreas" }, null, null, null) | |
| })); | |
| } | |
| } | |
| /// <summary> | |
| /// The initializaiton message - this is typically sent from the Python trainer to the C# environment. | |
| /// </summary> | |
| internal sealed partial class UnityRLInitializationInputProto : pb::IMessage<UnityRLInitializationInputProto> { | |
| private static readonly pb::MessageParser<UnityRLInitializationInputProto> _parser = new pb::MessageParser<UnityRLInitializationInputProto>(() => new UnityRLInitializationInputProto()); | |
| private pb::UnknownFieldSet _unknownFields; | |
| [] | |
| public static pb::MessageParser<UnityRLInitializationInputProto> Parser { get { return _parser; } } | |
| [] | |
| public static pbr::MessageDescriptor Descriptor { | |
| get { return global::Unity.MLAgents.CommunicatorObjects.UnityRlInitializationInputReflection.Descriptor.MessageTypes[0]; } | |
| } | |
| [] | |
| pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| get { return Descriptor; } | |
| } | |
| [] | |
| public UnityRLInitializationInputProto() { | |
| OnConstruction(); | |
| } | |
| partial void OnConstruction(); | |
| [] | |
| public UnityRLInitializationInputProto(UnityRLInitializationInputProto other) : this() { | |
| seed_ = other.seed_; | |
| communicationVersion_ = other.communicationVersion_; | |
| packageVersion_ = other.packageVersion_; | |
| Capabilities = other.capabilities_ != null ? other.Capabilities.Clone() : null; | |
| numAreas_ = other.numAreas_; | |
| _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); | |
| } | |
| [] | |
| public UnityRLInitializationInputProto Clone() { | |
| return new UnityRLInitializationInputProto(this); | |
| } | |
| /// <summary>Field number for the "seed" field.</summary> | |
| public const int SeedFieldNumber = 1; | |
| private int seed_; | |
| [] | |
| public int Seed { | |
| get { return seed_; } | |
| set { | |
| seed_ = value; | |
| } | |
| } | |
| /// <summary>Field number for the "communication_version" field.</summary> | |
| public const int CommunicationVersionFieldNumber = 2; | |
| private string communicationVersion_ = ""; | |
| /// <summary> | |
| /// Communication protocol version that the initiating side (typically the Python trainer) is using. | |
| /// </summary> | |
| [] | |
| public string CommunicationVersion { | |
| get { return communicationVersion_; } | |
| set { | |
| communicationVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | |
| } | |
| } | |
| /// <summary>Field number for the "package_version" field.</summary> | |
| public const int PackageVersionFieldNumber = 3; | |
| private string packageVersion_ = ""; | |
| /// <summary> | |
| /// Package/library version that the initiating side (typically the Python trainer) is using. | |
| /// </summary> | |
| [] | |
| public string PackageVersion { | |
| get { return packageVersion_; } | |
| set { | |
| packageVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | |
| } | |
| } | |
| /// <summary>Field number for the "capabilities" field.</summary> | |
| public const int CapabilitiesFieldNumber = 4; | |
| private global::Unity.MLAgents.CommunicatorObjects.UnityRLCapabilitiesProto capabilities_; | |
| /// <summary> | |
| /// The RL Capabilities of the Python trainer. | |
| /// </summary> | |
| [] | |
| public global::Unity.MLAgents.CommunicatorObjects.UnityRLCapabilitiesProto Capabilities { | |
| get { return capabilities_; } | |
| set { | |
| capabilities_ = value; | |
| } | |
| } | |
| /// <summary>Field number for the "num_areas" field.</summary> | |
| public const int NumAreasFieldNumber = 5; | |
| private int numAreas_; | |
| /// <summary> | |
| /// The number of training areas to instantiate | |
| /// </summary> | |
| [] | |
| public int NumAreas { | |
| get { return numAreas_; } | |
| set { | |
| numAreas_ = value; | |
| } | |
| } | |
| [] | |
| public override bool Equals(object other) { | |
| return Equals(other as UnityRLInitializationInputProto); | |
| } | |
| [] | |
| public bool Equals(UnityRLInitializationInputProto other) { | |
| if (ReferenceEquals(other, null)) { | |
| return false; | |
| } | |
| if (ReferenceEquals(other, this)) { | |
| return true; | |
| } | |
| if (Seed != other.Seed) return false; | |
| if (CommunicationVersion != other.CommunicationVersion) return false; | |
| if (PackageVersion != other.PackageVersion) return false; | |
| if (!object.Equals(Capabilities, other.Capabilities)) return false; | |
| if (NumAreas != other.NumAreas) return false; | |
| return Equals(_unknownFields, other._unknownFields); | |
| } | |
| [] | |
| public override int GetHashCode() { | |
| int hash = 1; | |
| if (Seed != 0) hash ^= Seed.GetHashCode(); | |
| if (CommunicationVersion.Length != 0) hash ^= CommunicationVersion.GetHashCode(); | |
| if (PackageVersion.Length != 0) hash ^= PackageVersion.GetHashCode(); | |
| if (capabilities_ != null) hash ^= Capabilities.GetHashCode(); | |
| if (NumAreas != 0) hash ^= NumAreas.GetHashCode(); | |
| if (_unknownFields != null) { | |
| hash ^= _unknownFields.GetHashCode(); | |
| } | |
| return hash; | |
| } | |
| [] | |
| public override string ToString() { | |
| return pb::JsonFormatter.ToDiagnosticString(this); | |
| } | |
| [] | |
| public void WriteTo(pb::CodedOutputStream output) { | |
| if (Seed != 0) { | |
| output.WriteRawTag(8); | |
| output.WriteInt32(Seed); | |
| } | |
| if (CommunicationVersion.Length != 0) { | |
| output.WriteRawTag(18); | |
| output.WriteString(CommunicationVersion); | |
| } | |
| if (PackageVersion.Length != 0) { | |
| output.WriteRawTag(26); | |
| output.WriteString(PackageVersion); | |
| } | |
| if (capabilities_ != null) { | |
| output.WriteRawTag(34); | |
| output.WriteMessage(Capabilities); | |
| } | |
| if (NumAreas != 0) { | |
| output.WriteRawTag(40); | |
| output.WriteInt32(NumAreas); | |
| } | |
| if (_unknownFields != null) { | |
| _unknownFields.WriteTo(output); | |
| } | |
| } | |
| [] | |
| public int CalculateSize() { | |
| int size = 0; | |
| if (Seed != 0) { | |
| size += 1 + pb::CodedOutputStream.ComputeInt32Size(Seed); | |
| } | |
| if (CommunicationVersion.Length != 0) { | |
| size += 1 + pb::CodedOutputStream.ComputeStringSize(CommunicationVersion); | |
| } | |
| if (PackageVersion.Length != 0) { | |
| size += 1 + pb::CodedOutputStream.ComputeStringSize(PackageVersion); | |
| } | |
| if (capabilities_ != null) { | |
| size += 1 + pb::CodedOutputStream.ComputeMessageSize(Capabilities); | |
| } | |
| if (NumAreas != 0) { | |
| size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumAreas); | |
| } | |
| if (_unknownFields != null) { | |
| size += _unknownFields.CalculateSize(); | |
| } | |
| return size; | |
| } | |
| [] | |
| public void MergeFrom(UnityRLInitializationInputProto other) { | |
| if (other == null) { | |
| return; | |
| } | |
| if (other.Seed != 0) { | |
| Seed = other.Seed; | |
| } | |
| if (other.CommunicationVersion.Length != 0) { | |
| CommunicationVersion = other.CommunicationVersion; | |
| } | |
| if (other.PackageVersion.Length != 0) { | |
| PackageVersion = other.PackageVersion; | |
| } | |
| if (other.capabilities_ != null) { | |
| if (capabilities_ == null) { | |
| capabilities_ = new global::Unity.MLAgents.CommunicatorObjects.UnityRLCapabilitiesProto(); | |
| } | |
| Capabilities.MergeFrom(other.Capabilities); | |
| } | |
| if (other.NumAreas != 0) { | |
| NumAreas = other.NumAreas; | |
| } | |
| _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); | |
| } | |
| [] | |
| public void MergeFrom(pb::CodedInputStream input) { | |
| uint tag; | |
| while ((tag = input.ReadTag()) != 0) { | |
| switch(tag) { | |
| default: | |
| _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); | |
| break; | |
| case 8: { | |
| Seed = input.ReadInt32(); | |
| break; | |
| } | |
| case 18: { | |
| CommunicationVersion = input.ReadString(); | |
| break; | |
| } | |
| case 26: { | |
| PackageVersion = input.ReadString(); | |
| break; | |
| } | |
| case 34: { | |
| if (capabilities_ == null) { | |
| capabilities_ = new global::Unity.MLAgents.CommunicatorObjects.UnityRLCapabilitiesProto(); | |
| } | |
| input.ReadMessage(capabilities_); | |
| break; | |
| } | |
| case 40: { | |
| NumAreas = input.ReadInt32(); | |
| break; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |