UnittestImportPublicProto3.cs 4.29 KB
Newer Older
1 2 3 4 5 6 7
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/protobuf/unittest_import_public_proto3.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
8
using pbr = global::Google.Protobuf.Reflection;
9 10 11
using scg = global::System.Collections.Generic;
namespace Google.Protobuf.TestProtos {

12
  /// <summary>Holder for reflection information generated from google/protobuf/unittest_import_public_proto3.proto</summary>
13
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14 15 16
  public static partial class UnittestImportPublicProto3 {

    #region Descriptor
17
    /// <summary>File descriptor for google/protobuf/unittest_import_public_proto3.proto</summary>
18
    public static pbr::FileDescriptor Descriptor {
19 20
      get { return descriptor; }
    }
21
    private static pbr::FileDescriptor descriptor;
22 23 24 25

    static UnittestImportPublicProto3() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
26 27 28
            "CjNnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0X3B1YmxpY19wcm90",
            "bzMucHJvdG8SGHByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydCIgChNQdWJsaWNJ",
            "bXBvcnRNZXNzYWdlEgkKAWUYASABKAVCNwoYY29tLmdvb2dsZS5wcm90b2J1",
29
            "Zi50ZXN0qgIaR29vZ2xlLlByb3RvYnVmLlRlc3RQcm90b3NiBnByb3RvMw=="));
30
      descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
31
          new pbr::FileDescriptor[] { },
32 33 34
          new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
            new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.PublicImportMessage), new[]{ "E" }, null, null, null)
          }));
35 36 37 38 39 40
    }
    #endregion

  }
  #region Messages
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
41
  public sealed partial class PublicImportMessage : pb::IMessage<PublicImportMessage> {
42 43 44
    private static readonly pb::MessageParser<PublicImportMessage> _parser = new pb::MessageParser<PublicImportMessage>(() => new PublicImportMessage());
    public static pb::MessageParser<PublicImportMessage> Parser { get { return _parser; } }

45
    public static pbr::MessageDescriptor Descriptor {
46
      get { return global::Google.Protobuf.TestProtos.UnittestImportPublicProto3.Descriptor.MessageTypes[0]; }
47 48
    }

49 50
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
51 52
    }

53 54 55 56 57
    public PublicImportMessage() {
      OnConstruction();
    }

    partial void OnConstruction();
Jon Skeet's avatar
Jon Skeet committed
58

59
    public PublicImportMessage(PublicImportMessage other) : this() {
Jon Skeet's avatar
Jon Skeet committed
60 61 62 63 64
      e_ = other.e_;
    }

    public PublicImportMessage Clone() {
      return new PublicImportMessage(this);
65
    }
Jon Skeet's avatar
Jon Skeet committed
66

67
    /// <summary>Field number for the "e" field.</summary>
68 69 70 71
    public const int EFieldNumber = 1;
    private int e_;
    public int E {
      get { return e_; }
72 73 74
      set {
        e_ = value;
      }
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
    }

    public override bool Equals(object other) {
      return Equals(other as PublicImportMessage);
    }

    public bool Equals(PublicImportMessage other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (E != other.E) return false;
      return true;
    }

    public override int GetHashCode() {
93
      int hash = 1;
94 95 96 97
      if (E != 0) hash ^= E.GetHashCode();
      return hash;
    }

98 99 100 101
    public override string ToString() {
      return pb::JsonFormatter.Default.Format(this);
    }

Jon Skeet's avatar
Jon Skeet committed
102
    public void WriteTo(pb::CodedOutputStream output) {
103
      if (E != 0) {
104 105
        output.WriteRawTag(8);
        output.WriteInt32(E);
106 107 108 109 110 111
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (E != 0) {
112
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(E);
113 114 115
      }
      return size;
    }
116

117 118 119 120 121 122 123 124 125
    public void MergeFrom(PublicImportMessage other) {
      if (other == null) {
        return;
      }
      if (other.E != 0) {
        E = other.E;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
126
    public void MergeFrom(pb::CodedInputStream input) {
127
      uint tag;
128
      while ((tag = input.ReadTag()) != 0) {
129 130
        switch(tag) {
          default:
131
            input.SkipLastField();
132 133
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
134
            E = input.ReadInt32();
135 136 137 138 139 140 141 142 143 144 145 146 147
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code