< Summary

Class:DCL.ECSComponents.PBAvatarAttach
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/AvatarAttach.gen.cs
Covered lines:9
Uncovered lines:59
Coverable lines:68
Total lines:348
Line coverage:13.2% (9 of 68)
Covered branches:0
Total branches:0
Covered methods:6
Total methods:21
Method coverage:28.5% (6 of 21)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBAvatarAttach()0%110100%
get_Descriptor()0%2100%
PBAvatarAttach()0%110100%
PBAvatarAttach(...)0%2100%
Clone()0%2100%
ClearAvatarId()0%2100%
Equals(...)0%2100%
Equals(...)0%30500%
GetHashCode()0%20400%
ToString()0%2100%
WriteTo(...)0%20400%
CalculateSize()0%20400%
MergeFrom(...)0%20400%
MergeFrom(...)0%20400%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/AvatarAttach.gen.cs

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: decentraland/sdk/components/avatar_attach.proto
 4// </auto-generated>
 5#pragma warning disable 1591, 0612, 3021
 6#region Designer generated code
 7
 8using pb = global::Google.Protobuf;
 9using pbc = global::Google.Protobuf.Collections;
 10using pbr = global::Google.Protobuf.Reflection;
 11using scg = global::System.Collections.Generic;
 12namespace DCL.ECSComponents {
 13
 14  /// <summary>Holder for reflection information generated from decentraland/sdk/components/avatar_attach.proto</summary
 15  public static partial class AvatarAttachReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for decentraland/sdk/components/avatar_attach.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static AvatarAttachReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "Ci9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYXZhdGFyX2F0dGFjaC5w",
 28            "cm90bxIbZGVjZW50cmFsYW5kLnNkay5jb21wb25lbnRzIoMBCg5QQkF2YXRh",
 29            "ckF0dGFjaBIWCglhdmF0YXJfaWQYASABKAlIAIgBARJLCg9hbmNob3JfcG9p",
 30            "bnRfaWQYAiABKA4yMi5kZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMuQXZh",
 31            "dGFyQW5jaG9yUG9pbnRUeXBlQgwKCl9hdmF0YXJfaWQqrgQKFUF2YXRhckFu",
 32            "Y2hvclBvaW50VHlwZRIRCg1BQVBUX1BPU0lUSU9OEAASEQoNQUFQVF9OQU1F",
 33            "X1RBRxABEg0KCUFBUFRfSEVBRBAEEg0KCUFBUFRfTkVDSxAFEg4KCkFBUFRf",
 34            "U1BJTkUQBhIPCgtBQVBUX1NQSU5FMRAHEg8KC0FBUFRfU1BJTkUyEAgSDAoI",
 35            "QUFQVF9ISVAQCRIWChJBQVBUX0xFRlRfU0hPVUxERVIQChIRCg1BQVBUX0xF",
 36            "RlRfQVJNEAsSFQoRQUFQVF9MRUZUX0ZPUkVBUk0QDBISCg5BQVBUX0xFRlRf",
 37            "SEFORBACEhgKFEFBUFRfTEVGVF9IQU5EX0lOREVYEA0SFwoTQUFQVF9SSUdI",
 38            "VF9TSE9VTERFUhAOEhIKDkFBUFRfUklHSFRfQVJNEA8SFgoSQUFQVF9SSUdI",
 39            "VF9GT1JFQVJNEBASEwoPQUFQVF9SSUdIVF9IQU5EEAMSGQoVQUFQVF9SSUdI",
 40            "VF9IQU5EX0lOREVYEBESFAoQQUFQVF9MRUZUX1VQX0xFRxASEhEKDUFBUFRf",
 41            "TEVGVF9MRUcQExISCg5BQVBUX0xFRlRfRk9PVBAUEhYKEkFBUFRfTEVGVF9U",
 42            "T0VfQkFTRRAVEhUKEUFBUFRfUklHSFRfVVBfTEVHEBYSEgoOQUFQVF9SSUdI",
 43            "VF9MRUcQFxITCg9BQVBUX1JJR0hUX0ZPT1QQGBIXChNBQVBUX1JJR0hUX1RP",
 44            "RV9CQVNFEBlCFKoCEURDTC5FQ1NDb21wb25lbnRzYgZwcm90bzM="));
 45      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 46          new pbr::FileDescriptor[] { },
 47          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::DCL.ECSComponents.AvatarAnchorPointType), }, null, new pbr
 48            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBAvatarAttach), global::DCL.ECSComponents.PB
 49          }));
 50    }
 51    #endregion
 52
 53  }
 54  #region Enums
 55  /// <summary>
 56  /// AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity.
 57  /// </summary>
 58  public enum AvatarAnchorPointType {
 59    [pbr::OriginalName("AAPT_POSITION")] AaptPosition = 0,
 60    [pbr::OriginalName("AAPT_NAME_TAG")] AaptNameTag = 1,
 61    [pbr::OriginalName("AAPT_HEAD")] AaptHead = 4,
 62    [pbr::OriginalName("AAPT_NECK")] AaptNeck = 5,
 63    [pbr::OriginalName("AAPT_SPINE")] AaptSpine = 6,
 64    [pbr::OriginalName("AAPT_SPINE1")] AaptSpine1 = 7,
 65    [pbr::OriginalName("AAPT_SPINE2")] AaptSpine2 = 8,
 66    [pbr::OriginalName("AAPT_HIP")] AaptHip = 9,
 67    [pbr::OriginalName("AAPT_LEFT_SHOULDER")] AaptLeftShoulder = 10,
 68    [pbr::OriginalName("AAPT_LEFT_ARM")] AaptLeftArm = 11,
 69    [pbr::OriginalName("AAPT_LEFT_FOREARM")] AaptLeftForearm = 12,
 70    [pbr::OriginalName("AAPT_LEFT_HAND")] AaptLeftHand = 2,
 71    [pbr::OriginalName("AAPT_LEFT_HAND_INDEX")] AaptLeftHandIndex = 13,
 72    [pbr::OriginalName("AAPT_RIGHT_SHOULDER")] AaptRightShoulder = 14,
 73    [pbr::OriginalName("AAPT_RIGHT_ARM")] AaptRightArm = 15,
 74    [pbr::OriginalName("AAPT_RIGHT_FOREARM")] AaptRightForearm = 16,
 75    [pbr::OriginalName("AAPT_RIGHT_HAND")] AaptRightHand = 3,
 76    [pbr::OriginalName("AAPT_RIGHT_HAND_INDEX")] AaptRightHandIndex = 17,
 77    [pbr::OriginalName("AAPT_LEFT_UP_LEG")] AaptLeftUpLeg = 18,
 78    [pbr::OriginalName("AAPT_LEFT_LEG")] AaptLeftLeg = 19,
 79    [pbr::OriginalName("AAPT_LEFT_FOOT")] AaptLeftFoot = 20,
 80    [pbr::OriginalName("AAPT_LEFT_TOE_BASE")] AaptLeftToeBase = 21,
 81    [pbr::OriginalName("AAPT_RIGHT_UP_LEG")] AaptRightUpLeg = 22,
 82    [pbr::OriginalName("AAPT_RIGHT_LEG")] AaptRightLeg = 23,
 83    [pbr::OriginalName("AAPT_RIGHT_FOOT")] AaptRightFoot = 24,
 84    [pbr::OriginalName("AAPT_RIGHT_TOE_BASE")] AaptRightToeBase = 25,
 85  }
 86
 87  #endregion
 88
 89  #region Messages
 90  /// <summary>
 91  /// The AvatarAttach component automatically repositions an Entity to maintain the same position and
 92  /// rotation relative to some part of an avatar, called the "anchor point". The Entity
 93  /// will follow this anchor as it moves.
 94  ///
 95  /// The Entity's own Transform is overridden by this component. To offset position and adjust scale,
 96  /// add a child to the anchored Entity and set a Transform on it instead.
 97  ///
 98  /// AvatarAnchorPointType indicates which part of the avatar the Entity must follow.
 99  /// </summary>
 100  public sealed partial class PBAvatarAttach : pb::IMessage<PBAvatarAttach>
 101  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 102      , pb::IBufferMessage
 103  #endif
 104  {
 1105    private static readonly pb::MessageParser<PBAvatarAttach> _parser = new pb::MessageParser<PBAvatarAttach>(() => new 
 106    private pb::UnknownFieldSet _unknownFields;
 107    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 108    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0109    public static pb::MessageParser<PBAvatarAttach> Parser { get { return _parser; } }
 110
 111    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 112    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 113    public static pbr::MessageDescriptor Descriptor {
 0114      get { return global::DCL.ECSComponents.AvatarAttachReflection.Descriptor.MessageTypes[0]; }
 115    }
 116
 117    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 118    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 119    pbr::MessageDescriptor pb::IMessage.Descriptor {
 0120      get { return Descriptor; }
 121    }
 122
 123    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 124    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 6125    public PBAvatarAttach() {
 126      OnConstruction();
 6127    }
 128
 129    partial void OnConstruction();
 130
 131    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 132    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0133    public PBAvatarAttach(PBAvatarAttach other) : this() {
 0134      avatarId_ = other.avatarId_;
 0135      anchorPointId_ = other.anchorPointId_;
 0136      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 0137    }
 138
 139    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 140    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 141    public PBAvatarAttach Clone() {
 0142      return new PBAvatarAttach(this);
 143    }
 144
 145    /// <summary>Field number for the "avatar_id" field.</summary>
 146    public const int AvatarIdFieldNumber = 1;
 147    private string avatarId_;
 148    /// <summary>
 149    /// the user ID of the avatar (default: local user)
 150    /// </summary>
 151    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 152    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 153    public string AvatarId {
 6154      get { return avatarId_ ?? ""; }
 155      set {
 6156        avatarId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 6157      }
 158    }
 159    /// <summary>Gets whether the "avatar_id" field is set</summary>
 160    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 161    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 162    public bool HasAvatarId {
 0163      get { return avatarId_ != null; }
 164    }
 165    /// <summary>Clears the value of the "avatar_id" field</summary>
 166    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 167    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 168    public void ClearAvatarId() {
 0169      avatarId_ = null;
 0170    }
 171
 172    /// <summary>Field number for the "anchor_point_id" field.</summary>
 173    public const int AnchorPointIdFieldNumber = 2;
 174    private global::DCL.ECSComponents.AvatarAnchorPointType anchorPointId_ = global::DCL.ECSComponents.AvatarAnchorPoint
 175    /// <summary>
 176    /// the anchor point.
 177    /// </summary>
 178    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 179    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 180    public global::DCL.ECSComponents.AvatarAnchorPointType AnchorPointId {
 6181      get { return anchorPointId_; }
 182      set {
 1183        anchorPointId_ = value;
 1184      }
 185    }
 186
 187    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 188    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 189    public override bool Equals(object other) {
 0190      return Equals(other as PBAvatarAttach);
 191    }
 192
 193    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 194    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 195    public bool Equals(PBAvatarAttach other) {
 0196      if (ReferenceEquals(other, null)) {
 0197        return false;
 198      }
 0199      if (ReferenceEquals(other, this)) {
 0200        return true;
 201      }
 0202      if (AvatarId != other.AvatarId) return false;
 0203      if (AnchorPointId != other.AnchorPointId) return false;
 0204      return Equals(_unknownFields, other._unknownFields);
 205    }
 206
 207    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 208    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 209    public override int GetHashCode() {
 0210      int hash = 1;
 0211      if (HasAvatarId) hash ^= AvatarId.GetHashCode();
 0212      if (AnchorPointId != global::DCL.ECSComponents.AvatarAnchorPointType.AaptPosition) hash ^= AnchorPointId.GetHashCo
 0213      if (_unknownFields != null) {
 0214        hash ^= _unknownFields.GetHashCode();
 215      }
 0216      return hash;
 217    }
 218
 219    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 220    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 221    public override string ToString() {
 0222      return pb::JsonFormatter.ToDiagnosticString(this);
 223    }
 224
 225    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 226    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 227    public void WriteTo(pb::CodedOutputStream output) {
 228    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 229      output.WriteRawMessage(this);
 230    #else
 0231      if (HasAvatarId) {
 0232        output.WriteRawTag(10);
 0233        output.WriteString(AvatarId);
 234      }
 0235      if (AnchorPointId != global::DCL.ECSComponents.AvatarAnchorPointType.AaptPosition) {
 0236        output.WriteRawTag(16);
 0237        output.WriteEnum((int) AnchorPointId);
 238      }
 0239      if (_unknownFields != null) {
 0240        _unknownFields.WriteTo(output);
 241      }
 242    #endif
 0243    }
 244
 245    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 246    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 247    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 248    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 249      if (HasAvatarId) {
 250        output.WriteRawTag(10);
 251        output.WriteString(AvatarId);
 252      }
 253      if (AnchorPointId != global::DCL.ECSComponents.AvatarAnchorPointType.AaptPosition) {
 254        output.WriteRawTag(16);
 255        output.WriteEnum((int) AnchorPointId);
 256      }
 257      if (_unknownFields != null) {
 258        _unknownFields.WriteTo(ref output);
 259      }
 260    }
 261    #endif
 262
 263    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 264    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 265    public int CalculateSize() {
 0266      int size = 0;
 0267      if (HasAvatarId) {
 0268        size += 1 + pb::CodedOutputStream.ComputeStringSize(AvatarId);
 269      }
 0270      if (AnchorPointId != global::DCL.ECSComponents.AvatarAnchorPointType.AaptPosition) {
 0271        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AnchorPointId);
 272      }
 0273      if (_unknownFields != null) {
 0274        size += _unknownFields.CalculateSize();
 275      }
 0276      return size;
 277    }
 278
 279    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 280    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 281    public void MergeFrom(PBAvatarAttach other) {
 0282      if (other == null) {
 0283        return;
 284      }
 0285      if (other.HasAvatarId) {
 0286        AvatarId = other.AvatarId;
 287      }
 0288      if (other.AnchorPointId != global::DCL.ECSComponents.AvatarAnchorPointType.AaptPosition) {
 0289        AnchorPointId = other.AnchorPointId;
 290      }
 0291      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0292    }
 293
 294    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 295    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 296    public void MergeFrom(pb::CodedInputStream input) {
 297    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 298      input.ReadRawMessage(this);
 299    #else
 300      uint tag;
 0301      while ((tag = input.ReadTag()) != 0) {
 302        switch(tag) {
 303          default:
 0304            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0305            break;
 306          case 10: {
 0307            AvatarId = input.ReadString();
 0308            break;
 309          }
 310          case 16: {
 0311            AnchorPointId = (global::DCL.ECSComponents.AvatarAnchorPointType) input.ReadEnum();
 312            break;
 313          }
 314        }
 315      }
 316    #endif
 0317    }
 318
 319    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 320    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 321    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 322    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 323      uint tag;
 324      while ((tag = input.ReadTag()) != 0) {
 325        switch(tag) {
 326          default:
 327            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 328            break;
 329          case 10: {
 330            AvatarId = input.ReadString();
 331            break;
 332          }
 333          case 16: {
 334            AnchorPointId = (global::DCL.ECSComponents.AvatarAnchorPointType) input.ReadEnum();
 335            break;
 336          }
 337        }
 338      }
 339    }
 340    #endif
 341
 342  }
 343
 344  #endregion
 345
 346}
 347
 348#endregion Designer generated code