Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1 | // <auto-generated> |
| 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | // source: google/protobuf/descriptor.proto |
| 4 | // </auto-generated> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5 | #pragma warning disable 1591, 0612, 3021 |
| 6 | #region Designer generated code |
| 7 | |
| 8 | using pb = global::Google.Protobuf; |
| 9 | using pbc = global::Google.Protobuf.Collections; |
| 10 | using pbr = global::Google.Protobuf.Reflection; |
| 11 | using scg = global::System.Collections.Generic; |
| 12 | namespace Google.Protobuf.Reflection { |
| 13 | |
| 14 | /// <summary>Holder for reflection information generated from google/protobuf/descriptor.proto</summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 15 | internal static partial class DescriptorReflection { |
| 16 | |
| 17 | #region Descriptor |
| 18 | /// <summary>File descriptor for google/protobuf/descriptor.proto</summary> |
| 19 | public static pbr::FileDescriptor Descriptor { |
| 20 | get { return descriptor; } |
| 21 | } |
| 22 | private static pbr::FileDescriptor descriptor; |
| 23 | |
| 24 | static DescriptorReflection() { |
| 25 | byte[] descriptorData = global::System.Convert.FromBase64String( |
| 26 | string.Concat( |
| 27 | "CiBnb29nbGUvcHJvdG9idWYvZGVzY3JpcHRvci5wcm90bxIPZ29vZ2xlLnBy", |
| 28 | "b3RvYnVmIkcKEUZpbGVEZXNjcmlwdG9yU2V0EjIKBGZpbGUYASADKAsyJC5n", |
| 29 | "b29nbGUucHJvdG9idWYuRmlsZURlc2NyaXB0b3JQcm90byLbAwoTRmlsZURl", |
| 30 | "c2NyaXB0b3JQcm90bxIMCgRuYW1lGAEgASgJEg8KB3BhY2thZ2UYAiABKAkS", |
| 31 | "EgoKZGVwZW5kZW5jeRgDIAMoCRIZChFwdWJsaWNfZGVwZW5kZW5jeRgKIAMo", |
| 32 | "BRIXCg93ZWFrX2RlcGVuZGVuY3kYCyADKAUSNgoMbWVzc2FnZV90eXBlGAQg", |
| 33 | "AygLMiAuZ29vZ2xlLnByb3RvYnVmLkRlc2NyaXB0b3JQcm90bxI3CgllbnVt", |
| 34 | "X3R5cGUYBSADKAsyJC5nb29nbGUucHJvdG9idWYuRW51bURlc2NyaXB0b3JQ", |
| 35 | "cm90bxI4CgdzZXJ2aWNlGAYgAygLMicuZ29vZ2xlLnByb3RvYnVmLlNlcnZp", |
| 36 | "Y2VEZXNjcmlwdG9yUHJvdG8SOAoJZXh0ZW5zaW9uGAcgAygLMiUuZ29vZ2xl", |
| 37 | "LnByb3RvYnVmLkZpZWxkRGVzY3JpcHRvclByb3RvEi0KB29wdGlvbnMYCCAB", |
| 38 | "KAsyHC5nb29nbGUucHJvdG9idWYuRmlsZU9wdGlvbnMSOQoQc291cmNlX2Nv", |
| 39 | "ZGVfaW5mbxgJIAEoCzIfLmdvb2dsZS5wcm90b2J1Zi5Tb3VyY2VDb2RlSW5m", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 40 | "bxIOCgZzeW50YXgYDCABKAkiqQUKD0Rlc2NyaXB0b3JQcm90bxIMCgRuYW1l", |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 41 | "GAEgASgJEjQKBWZpZWxkGAIgAygLMiUuZ29vZ2xlLnByb3RvYnVmLkZpZWxk", |
| 42 | "RGVzY3JpcHRvclByb3RvEjgKCWV4dGVuc2lvbhgGIAMoCzIlLmdvb2dsZS5w", |
| 43 | "cm90b2J1Zi5GaWVsZERlc2NyaXB0b3JQcm90bxI1CgtuZXN0ZWRfdHlwZRgD", |
| 44 | "IAMoCzIgLmdvb2dsZS5wcm90b2J1Zi5EZXNjcmlwdG9yUHJvdG8SNwoJZW51", |
| 45 | "bV90eXBlGAQgAygLMiQuZ29vZ2xlLnByb3RvYnVmLkVudW1EZXNjcmlwdG9y", |
| 46 | "UHJvdG8SSAoPZXh0ZW5zaW9uX3JhbmdlGAUgAygLMi8uZ29vZ2xlLnByb3Rv", |
| 47 | "YnVmLkRlc2NyaXB0b3JQcm90by5FeHRlbnNpb25SYW5nZRI5CgpvbmVvZl9k", |
| 48 | "ZWNsGAggAygLMiUuZ29vZ2xlLnByb3RvYnVmLk9uZW9mRGVzY3JpcHRvclBy", |
| 49 | "b3RvEjAKB29wdGlvbnMYByABKAsyHy5nb29nbGUucHJvdG9idWYuTWVzc2Fn", |
| 50 | "ZU9wdGlvbnMSRgoOcmVzZXJ2ZWRfcmFuZ2UYCSADKAsyLi5nb29nbGUucHJv", |
| 51 | "dG9idWYuRGVzY3JpcHRvclByb3RvLlJlc2VydmVkUmFuZ2USFQoNcmVzZXJ2", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 52 | "ZWRfbmFtZRgKIAMoCRplCg5FeHRlbnNpb25SYW5nZRINCgVzdGFydBgBIAEo", |
| 53 | "BRILCgNlbmQYAiABKAUSNwoHb3B0aW9ucxgDIAEoCzImLmdvb2dsZS5wcm90", |
| 54 | "b2J1Zi5FeHRlbnNpb25SYW5nZU9wdGlvbnMaKwoNUmVzZXJ2ZWRSYW5nZRIN", |
| 55 | "CgVzdGFydBgBIAEoBRILCgNlbmQYAiABKAUiZwoVRXh0ZW5zaW9uUmFuZ2VP", |
| 56 | "cHRpb25zEkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIkLmdvb2ds", |
| 57 | "ZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uKgkI6AcQgICAgAIivAUK", |
| 58 | "FEZpZWxkRGVzY3JpcHRvclByb3RvEgwKBG5hbWUYASABKAkSDgoGbnVtYmVy", |
| 59 | "GAMgASgFEjoKBWxhYmVsGAQgASgOMisuZ29vZ2xlLnByb3RvYnVmLkZpZWxk", |
| 60 | "RGVzY3JpcHRvclByb3RvLkxhYmVsEjgKBHR5cGUYBSABKA4yKi5nb29nbGUu", |
| 61 | "cHJvdG9idWYuRmllbGREZXNjcmlwdG9yUHJvdG8uVHlwZRIRCgl0eXBlX25h", |
| 62 | "bWUYBiABKAkSEAoIZXh0ZW5kZWUYAiABKAkSFQoNZGVmYXVsdF92YWx1ZRgH", |
| 63 | "IAEoCRITCgtvbmVvZl9pbmRleBgJIAEoBRIRCglqc29uX25hbWUYCiABKAkS", |
| 64 | "LgoHb3B0aW9ucxgIIAEoCzIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlv", |
| 65 | "bnMitgIKBFR5cGUSDwoLVFlQRV9ET1VCTEUQARIOCgpUWVBFX0ZMT0FUEAIS", |
| 66 | "DgoKVFlQRV9JTlQ2NBADEg8KC1RZUEVfVUlOVDY0EAQSDgoKVFlQRV9JTlQz", |
| 67 | "MhAFEhAKDFRZUEVfRklYRUQ2NBAGEhAKDFRZUEVfRklYRUQzMhAHEg0KCVRZ", |
| 68 | "UEVfQk9PTBAIEg8KC1RZUEVfU1RSSU5HEAkSDgoKVFlQRV9HUk9VUBAKEhAK", |
| 69 | "DFRZUEVfTUVTU0FHRRALEg4KClRZUEVfQllURVMQDBIPCgtUWVBFX1VJTlQz", |
| 70 | "MhANEg0KCVRZUEVfRU5VTRAOEhEKDVRZUEVfU0ZJWEVEMzIQDxIRCg1UWVBF", |
| 71 | "X1NGSVhFRDY0EBASDwoLVFlQRV9TSU5UMzIQERIPCgtUWVBFX1NJTlQ2NBAS", |
| 72 | "IkMKBUxhYmVsEhIKDkxBQkVMX09QVElPTkFMEAESEgoOTEFCRUxfUkVRVUlS", |
| 73 | "RUQQAhISCg5MQUJFTF9SRVBFQVRFRBADIlQKFE9uZW9mRGVzY3JpcHRvclBy", |
| 74 | "b3RvEgwKBG5hbWUYASABKAkSLgoHb3B0aW9ucxgCIAEoCzIdLmdvb2dsZS5w", |
| 75 | "cm90b2J1Zi5PbmVvZk9wdGlvbnMipAIKE0VudW1EZXNjcmlwdG9yUHJvdG8S", |
| 76 | "DAoEbmFtZRgBIAEoCRI4CgV2YWx1ZRgCIAMoCzIpLmdvb2dsZS5wcm90b2J1", |
| 77 | "Zi5FbnVtVmFsdWVEZXNjcmlwdG9yUHJvdG8SLQoHb3B0aW9ucxgDIAEoCzIc", |
| 78 | "Lmdvb2dsZS5wcm90b2J1Zi5FbnVtT3B0aW9ucxJOCg5yZXNlcnZlZF9yYW5n", |
| 79 | "ZRgEIAMoCzI2Lmdvb2dsZS5wcm90b2J1Zi5FbnVtRGVzY3JpcHRvclByb3Rv", |
| 80 | "LkVudW1SZXNlcnZlZFJhbmdlEhUKDXJlc2VydmVkX25hbWUYBSADKAkaLwoR", |
| 81 | "RW51bVJlc2VydmVkUmFuZ2USDQoFc3RhcnQYASABKAUSCwoDZW5kGAIgASgF", |
| 82 | "ImwKGEVudW1WYWx1ZURlc2NyaXB0b3JQcm90bxIMCgRuYW1lGAEgASgJEg4K", |
| 83 | "Bm51bWJlchgCIAEoBRIyCgdvcHRpb25zGAMgASgLMiEuZ29vZ2xlLnByb3Rv", |
| 84 | "YnVmLkVudW1WYWx1ZU9wdGlvbnMikAEKFlNlcnZpY2VEZXNjcmlwdG9yUHJv", |
| 85 | "dG8SDAoEbmFtZRgBIAEoCRI2CgZtZXRob2QYAiADKAsyJi5nb29nbGUucHJv", |
| 86 | "dG9idWYuTWV0aG9kRGVzY3JpcHRvclByb3RvEjAKB29wdGlvbnMYAyABKAsy", |
| 87 | "Hy5nb29nbGUucHJvdG9idWYuU2VydmljZU9wdGlvbnMiwQEKFU1ldGhvZERl", |
| 88 | "c2NyaXB0b3JQcm90bxIMCgRuYW1lGAEgASgJEhIKCmlucHV0X3R5cGUYAiAB", |
| 89 | "KAkSEwoLb3V0cHV0X3R5cGUYAyABKAkSLwoHb3B0aW9ucxgEIAEoCzIeLmdv", |
| 90 | "b2dsZS5wcm90b2J1Zi5NZXRob2RPcHRpb25zEh8KEGNsaWVudF9zdHJlYW1p", |
| 91 | "bmcYBSABKAg6BWZhbHNlEh8KEHNlcnZlcl9zdHJlYW1pbmcYBiABKAg6BWZh", |
| 92 | "bHNlIqYGCgtGaWxlT3B0aW9ucxIUCgxqYXZhX3BhY2thZ2UYASABKAkSHAoU", |
| 93 | "amF2YV9vdXRlcl9jbGFzc25hbWUYCCABKAkSIgoTamF2YV9tdWx0aXBsZV9m", |
| 94 | "aWxlcxgKIAEoCDoFZmFsc2USKQodamF2YV9nZW5lcmF0ZV9lcXVhbHNfYW5k", |
| 95 | "X2hhc2gYFCABKAhCAhgBEiUKFmphdmFfc3RyaW5nX2NoZWNrX3V0ZjgYGyAB", |
| 96 | "KAg6BWZhbHNlEkYKDG9wdGltaXplX2ZvchgJIAEoDjIpLmdvb2dsZS5wcm90", |
| 97 | "b2J1Zi5GaWxlT3B0aW9ucy5PcHRpbWl6ZU1vZGU6BVNQRUVEEhIKCmdvX3Bh", |
| 98 | "Y2thZ2UYCyABKAkSIgoTY2NfZ2VuZXJpY19zZXJ2aWNlcxgQIAEoCDoFZmFs", |
| 99 | "c2USJAoVamF2YV9nZW5lcmljX3NlcnZpY2VzGBEgASgIOgVmYWxzZRIiChNw", |
| 100 | "eV9nZW5lcmljX3NlcnZpY2VzGBIgASgIOgVmYWxzZRIjChRwaHBfZ2VuZXJp", |
| 101 | "Y19zZXJ2aWNlcxgqIAEoCDoFZmFsc2USGQoKZGVwcmVjYXRlZBgXIAEoCDoF", |
| 102 | "ZmFsc2USHwoQY2NfZW5hYmxlX2FyZW5hcxgfIAEoCDoFZmFsc2USGQoRb2Jq", |
| 103 | "Y19jbGFzc19wcmVmaXgYJCABKAkSGAoQY3NoYXJwX25hbWVzcGFjZRglIAEo", |
| 104 | "CRIUCgxzd2lmdF9wcmVmaXgYJyABKAkSGAoQcGhwX2NsYXNzX3ByZWZpeBgo", |
| 105 | "IAEoCRIVCg1waHBfbmFtZXNwYWNlGCkgASgJEh4KFnBocF9tZXRhZGF0YV9u", |
| 106 | "YW1lc3BhY2UYLCABKAkSFAoMcnVieV9wYWNrYWdlGC0gASgJEkMKFHVuaW50", |
| 107 | "ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5Vbmlu", |
| 108 | "dGVycHJldGVkT3B0aW9uIjoKDE9wdGltaXplTW9kZRIJCgVTUEVFRBABEg0K", |
| 109 | "CUNPREVfU0laRRACEhAKDExJVEVfUlVOVElNRRADKgkI6AcQgICAgAJKBAgm", |
| 110 | "ECci8gEKDk1lc3NhZ2VPcHRpb25zEiYKF21lc3NhZ2Vfc2V0X3dpcmVfZm9y", |
| 111 | "bWF0GAEgASgIOgVmYWxzZRIuCh9ub19zdGFuZGFyZF9kZXNjcmlwdG9yX2Fj", |
| 112 | "Y2Vzc29yGAIgASgIOgVmYWxzZRIZCgpkZXByZWNhdGVkGAMgASgIOgVmYWxz", |
| 113 | "ZRIRCgltYXBfZW50cnkYByABKAgSQwoUdW5pbnRlcnByZXRlZF9vcHRpb24Y", |
| 114 | "5wcgAygLMiQuZ29vZ2xlLnByb3RvYnVmLlVuaW50ZXJwcmV0ZWRPcHRpb24q", |
| 115 | "CQjoBxCAgICAAkoECAgQCUoECAkQCiKeAwoMRmllbGRPcHRpb25zEjoKBWN0", |
| 116 | "eXBlGAEgASgOMiMuZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucy5DVHlw", |
| 117 | "ZToGU1RSSU5HEg4KBnBhY2tlZBgCIAEoCBI/CgZqc3R5cGUYBiABKA4yJC5n", |
| 118 | "b29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zLkpTVHlwZToJSlNfTk9STUFM", |
| 119 | "EhMKBGxhenkYBSABKAg6BWZhbHNlEhkKCmRlcHJlY2F0ZWQYAyABKAg6BWZh", |
| 120 | "bHNlEhMKBHdlYWsYCiABKAg6BWZhbHNlEkMKFHVuaW50ZXJwcmV0ZWRfb3B0", |
| 121 | "aW9uGOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0", |
| 122 | "aW9uIi8KBUNUeXBlEgoKBlNUUklORxAAEggKBENPUkQQARIQCgxTVFJJTkdf", |
| 123 | "UElFQ0UQAiI1CgZKU1R5cGUSDQoJSlNfTk9STUFMEAASDQoJSlNfU1RSSU5H", |
| 124 | "EAESDQoJSlNfTlVNQkVSEAIqCQjoBxCAgICAAkoECAQQBSJeCgxPbmVvZk9w", |
| 125 | "dGlvbnMSQwoUdW5pbnRlcnByZXRlZF9vcHRpb24Y5wcgAygLMiQuZ29vZ2xl", |
| 126 | "LnByb3RvYnVmLlVuaW50ZXJwcmV0ZWRPcHRpb24qCQjoBxCAgICAAiKTAQoL", |
| 127 | "RW51bU9wdGlvbnMSEwoLYWxsb3dfYWxpYXMYAiABKAgSGQoKZGVwcmVjYXRl", |
| 128 | "ZBgDIAEoCDoFZmFsc2USQwoUdW5pbnRlcnByZXRlZF9vcHRpb24Y5wcgAygL", |
| 129 | "MiQuZ29vZ2xlLnByb3RvYnVmLlVuaW50ZXJwcmV0ZWRPcHRpb24qCQjoBxCA", |
| 130 | "gICAAkoECAUQBiJ9ChBFbnVtVmFsdWVPcHRpb25zEhkKCmRlcHJlY2F0ZWQY", |
| 131 | "ASABKAg6BWZhbHNlEkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIk", |
| 132 | "Lmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uKgkI6AcQgICA", |
| 133 | "gAIiewoOU2VydmljZU9wdGlvbnMSGQoKZGVwcmVjYXRlZBghIAEoCDoFZmFs", |
| 134 | "c2USQwoUdW5pbnRlcnByZXRlZF9vcHRpb24Y5wcgAygLMiQuZ29vZ2xlLnBy", |
| 135 | "b3RvYnVmLlVuaW50ZXJwcmV0ZWRPcHRpb24qCQjoBxCAgICAAiKtAgoNTWV0", |
| 136 | "aG9kT3B0aW9ucxIZCgpkZXByZWNhdGVkGCEgASgIOgVmYWxzZRJfChFpZGVt", |
| 137 | "cG90ZW5jeV9sZXZlbBgiIAEoDjIvLmdvb2dsZS5wcm90b2J1Zi5NZXRob2RP", |
| 138 | "cHRpb25zLklkZW1wb3RlbmN5TGV2ZWw6E0lERU1QT1RFTkNZX1VOS05PV04S", |
| 139 | "QwoUdW5pbnRlcnByZXRlZF9vcHRpb24Y5wcgAygLMiQuZ29vZ2xlLnByb3Rv", |
| 140 | "YnVmLlVuaW50ZXJwcmV0ZWRPcHRpb24iUAoQSWRlbXBvdGVuY3lMZXZlbBIX", |
| 141 | "ChNJREVNUE9URU5DWV9VTktOT1dOEAASEwoPTk9fU0lERV9FRkZFQ1RTEAES", |
| 142 | "DgoKSURFTVBPVEVOVBACKgkI6AcQgICAgAIingIKE1VuaW50ZXJwcmV0ZWRP", |
| 143 | "cHRpb24SOwoEbmFtZRgCIAMoCzItLmdvb2dsZS5wcm90b2J1Zi5VbmludGVy", |
| 144 | "cHJldGVkT3B0aW9uLk5hbWVQYXJ0EhgKEGlkZW50aWZpZXJfdmFsdWUYAyAB", |
| 145 | "KAkSGgoScG9zaXRpdmVfaW50X3ZhbHVlGAQgASgEEhoKEm5lZ2F0aXZlX2lu", |
| 146 | "dF92YWx1ZRgFIAEoAxIUCgxkb3VibGVfdmFsdWUYBiABKAESFAoMc3RyaW5n", |
| 147 | "X3ZhbHVlGAcgASgMEhcKD2FnZ3JlZ2F0ZV92YWx1ZRgIIAEoCRozCghOYW1l", |
| 148 | "UGFydBIRCgluYW1lX3BhcnQYASACKAkSFAoMaXNfZXh0ZW5zaW9uGAIgAigI", |
| 149 | "ItUBCg5Tb3VyY2VDb2RlSW5mbxI6Cghsb2NhdGlvbhgBIAMoCzIoLmdvb2ds", |
| 150 | "ZS5wcm90b2J1Zi5Tb3VyY2VDb2RlSW5mby5Mb2NhdGlvbhqGAQoITG9jYXRp", |
| 151 | "b24SEAoEcGF0aBgBIAMoBUICEAESEAoEc3BhbhgCIAMoBUICEAESGAoQbGVh", |
| 152 | "ZGluZ19jb21tZW50cxgDIAEoCRIZChF0cmFpbGluZ19jb21tZW50cxgEIAEo", |
| 153 | "CRIhChlsZWFkaW5nX2RldGFjaGVkX2NvbW1lbnRzGAYgAygJIqcBChFHZW5l", |
| 154 | "cmF0ZWRDb2RlSW5mbxJBCgphbm5vdGF0aW9uGAEgAygLMi0uZ29vZ2xlLnBy", |
| 155 | "b3RvYnVmLkdlbmVyYXRlZENvZGVJbmZvLkFubm90YXRpb24aTwoKQW5ub3Rh", |
| 156 | "dGlvbhIQCgRwYXRoGAEgAygFQgIQARITCgtzb3VyY2VfZmlsZRgCIAEoCRIN", |
| 157 | "CgViZWdpbhgDIAEoBRILCgNlbmQYBCABKAVCjwEKE2NvbS5nb29nbGUucHJv", |
| 158 | "dG9idWZCEERlc2NyaXB0b3JQcm90b3NIAVo+Z2l0aHViLmNvbS9nb2xhbmcv", |
| 159 | "cHJvdG9idWYvcHJvdG9jLWdlbi1nby9kZXNjcmlwdG9yO2Rlc2NyaXB0b3L4", |
| 160 | "AQGiAgNHUEKqAhpHb29nbGUuUHJvdG9idWYuUmVmbGVjdGlvbg==")); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 161 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
| 162 | new pbr::FileDescriptor[] { }, |
| 163 | new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
| 164 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FileDescriptorSet), global::Google.Protobuf.Reflection.FileDescriptorSet.Parser, new[]{ "File" }, null, null, null), |
| 165 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FileDescriptorProto), global::Google.Protobuf.Reflection.FileDescriptorProto.Parser, new[]{ "Name", "Package", "Dependency", "PublicDependency", "WeakDependency", "MessageType", "EnumType", "Service", "Extension", "Options", "SourceCodeInfo", "Syntax" }, null, null, null), |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 166 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.DescriptorProto), global::Google.Protobuf.Reflection.DescriptorProto.Parser, new[]{ "Name", "Field", "Extension", "NestedType", "EnumType", "ExtensionRange", "OneofDecl", "Options", "ReservedRange", "ReservedName" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange), global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange.Parser, new[]{ "Start", "End", "Options" }, null, null, null), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 167 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange), global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange.Parser, new[]{ "Start", "End" }, null, null, null)}), |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 168 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.ExtensionRangeOptions), global::Google.Protobuf.Reflection.ExtensionRangeOptions.Parser, new[]{ "UninterpretedOption" }, null, null, null), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 169 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FieldDescriptorProto), global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser, new[]{ "Name", "Number", "Label", "Type", "TypeName", "Extendee", "DefaultValue", "OneofIndex", "JsonName", "Options" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type), typeof(global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label) }, null), |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 170 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.OneofDescriptorProto), global::Google.Protobuf.Reflection.OneofDescriptorProto.Parser, new[]{ "Name", "Options" }, null, null, null), |
| 171 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumDescriptorProto), global::Google.Protobuf.Reflection.EnumDescriptorProto.Parser, new[]{ "Name", "Value", "Options", "ReservedRange", "ReservedName" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumDescriptorProto.Types.EnumReservedRange), global::Google.Protobuf.Reflection.EnumDescriptorProto.Types.EnumReservedRange.Parser, new[]{ "Start", "End" }, null, null, null)}), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 172 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumValueDescriptorProto), global::Google.Protobuf.Reflection.EnumValueDescriptorProto.Parser, new[]{ "Name", "Number", "Options" }, null, null, null), |
| 173 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.ServiceDescriptorProto), global::Google.Protobuf.Reflection.ServiceDescriptorProto.Parser, new[]{ "Name", "Method", "Options" }, null, null, null), |
| 174 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.MethodDescriptorProto), global::Google.Protobuf.Reflection.MethodDescriptorProto.Parser, new[]{ "Name", "InputType", "OutputType", "Options", "ClientStreaming", "ServerStreaming" }, null, null, null), |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 175 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FileOptions), global::Google.Protobuf.Reflection.FileOptions.Parser, new[]{ "JavaPackage", "JavaOuterClassname", "JavaMultipleFiles", "JavaGenerateEqualsAndHash", "JavaStringCheckUtf8", "OptimizeFor", "GoPackage", "CcGenericServices", "JavaGenericServices", "PyGenericServices", "PhpGenericServices", "Deprecated", "CcEnableArenas", "ObjcClassPrefix", "CsharpNamespace", "SwiftPrefix", "PhpClassPrefix", "PhpNamespace", "PhpMetadataNamespace", "RubyPackage", "UninterpretedOption" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode) }, null), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 176 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.MessageOptions), global::Google.Protobuf.Reflection.MessageOptions.Parser, new[]{ "MessageSetWireFormat", "NoStandardDescriptorAccessor", "Deprecated", "MapEntry", "UninterpretedOption" }, null, null, null), |
| 177 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FieldOptions), global::Google.Protobuf.Reflection.FieldOptions.Parser, new[]{ "Ctype", "Packed", "Jstype", "Lazy", "Deprecated", "Weak", "UninterpretedOption" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.CType), typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.JSType) }, null), |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 178 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.OneofOptions), global::Google.Protobuf.Reflection.OneofOptions.Parser, new[]{ "UninterpretedOption" }, null, null, null), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 179 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumOptions), global::Google.Protobuf.Reflection.EnumOptions.Parser, new[]{ "AllowAlias", "Deprecated", "UninterpretedOption" }, null, null, null), |
| 180 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumValueOptions), global::Google.Protobuf.Reflection.EnumValueOptions.Parser, new[]{ "Deprecated", "UninterpretedOption" }, null, null, null), |
| 181 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.ServiceOptions), global::Google.Protobuf.Reflection.ServiceOptions.Parser, new[]{ "Deprecated", "UninterpretedOption" }, null, null, null), |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 182 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.MethodOptions), global::Google.Protobuf.Reflection.MethodOptions.Parser, new[]{ "Deprecated", "IdempotencyLevel", "UninterpretedOption" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel) }, null), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 183 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.UninterpretedOption), global::Google.Protobuf.Reflection.UninterpretedOption.Parser, new[]{ "Name", "IdentifierValue", "PositiveIntValue", "NegativeIntValue", "DoubleValue", "StringValue", "AggregateValue" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart), global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart.Parser, new[]{ "NamePart_", "IsExtension" }, null, null, null)}), |
| 184 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.SourceCodeInfo), global::Google.Protobuf.Reflection.SourceCodeInfo.Parser, new[]{ "Location" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location), global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location.Parser, new[]{ "Path", "Span", "LeadingComments", "TrailingComments", "LeadingDetachedComments" }, null, null, null)}), |
| 185 | new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.GeneratedCodeInfo), global::Google.Protobuf.Reflection.GeneratedCodeInfo.Parser, new[]{ "Annotation" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation), global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Parser, new[]{ "Path", "SourceFile", "Begin", "End" }, null, null, null)}) |
| 186 | })); |
| 187 | } |
| 188 | #endregion |
| 189 | |
| 190 | } |
| 191 | #region Messages |
| 192 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 193 | /// The protocol compiler can output a FileDescriptorSet containing the .proto |
| 194 | /// files it parses. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 195 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 196 | internal sealed partial class FileDescriptorSet : pb::IMessage<FileDescriptorSet> { |
| 197 | private static readonly pb::MessageParser<FileDescriptorSet> _parser = new pb::MessageParser<FileDescriptorSet>(() => new FileDescriptorSet()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 198 | private pb::UnknownFieldSet _unknownFields; |
| 199 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 200 | public static pb::MessageParser<FileDescriptorSet> Parser { get { return _parser; } } |
| 201 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 202 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 203 | public static pbr::MessageDescriptor Descriptor { |
| 204 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[0]; } |
| 205 | } |
| 206 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 207 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 208 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 209 | get { return Descriptor; } |
| 210 | } |
| 211 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 212 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 213 | public FileDescriptorSet() { |
| 214 | OnConstruction(); |
| 215 | } |
| 216 | |
| 217 | partial void OnConstruction(); |
| 218 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 219 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 220 | public FileDescriptorSet(FileDescriptorSet other) : this() { |
| 221 | file_ = other.file_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 222 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 223 | } |
| 224 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 225 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 226 | public FileDescriptorSet Clone() { |
| 227 | return new FileDescriptorSet(this); |
| 228 | } |
| 229 | |
| 230 | /// <summary>Field number for the "file" field.</summary> |
| 231 | public const int FileFieldNumber = 1; |
| 232 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.FileDescriptorProto> _repeated_file_codec |
| 233 | = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.FileDescriptorProto.Parser); |
| 234 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.FileDescriptorProto> file_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.FileDescriptorProto>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 235 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 236 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.FileDescriptorProto> File { |
| 237 | get { return file_; } |
| 238 | } |
| 239 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 240 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 241 | public override bool Equals(object other) { |
| 242 | return Equals(other as FileDescriptorSet); |
| 243 | } |
| 244 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 245 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 246 | public bool Equals(FileDescriptorSet other) { |
| 247 | if (ReferenceEquals(other, null)) { |
| 248 | return false; |
| 249 | } |
| 250 | if (ReferenceEquals(other, this)) { |
| 251 | return true; |
| 252 | } |
| 253 | if(!file_.Equals(other.file_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 254 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 255 | } |
| 256 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 257 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 258 | public override int GetHashCode() { |
| 259 | int hash = 1; |
| 260 | hash ^= file_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 261 | if (_unknownFields != null) { |
| 262 | hash ^= _unknownFields.GetHashCode(); |
| 263 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 264 | return hash; |
| 265 | } |
| 266 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 267 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 268 | public override string ToString() { |
| 269 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 270 | } |
| 271 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 272 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 273 | public void WriteTo(pb::CodedOutputStream output) { |
| 274 | file_.WriteTo(output, _repeated_file_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 275 | if (_unknownFields != null) { |
| 276 | _unknownFields.WriteTo(output); |
| 277 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 278 | } |
| 279 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 280 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 281 | public int CalculateSize() { |
| 282 | int size = 0; |
| 283 | size += file_.CalculateSize(_repeated_file_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 284 | if (_unknownFields != null) { |
| 285 | size += _unknownFields.CalculateSize(); |
| 286 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 287 | return size; |
| 288 | } |
| 289 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 290 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 291 | public void MergeFrom(FileDescriptorSet other) { |
| 292 | if (other == null) { |
| 293 | return; |
| 294 | } |
| 295 | file_.Add(other.file_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 296 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 297 | } |
| 298 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 299 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 300 | public void MergeFrom(pb::CodedInputStream input) { |
| 301 | uint tag; |
| 302 | while ((tag = input.ReadTag()) != 0) { |
| 303 | switch(tag) { |
| 304 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 305 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 306 | break; |
| 307 | case 10: { |
| 308 | file_.AddEntriesFrom(input, _repeated_file_codec); |
| 309 | break; |
| 310 | } |
| 311 | } |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | } |
| 316 | |
| 317 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 318 | /// Describes a complete .proto file. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 319 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 320 | internal sealed partial class FileDescriptorProto : pb::IMessage<FileDescriptorProto> { |
| 321 | private static readonly pb::MessageParser<FileDescriptorProto> _parser = new pb::MessageParser<FileDescriptorProto>(() => new FileDescriptorProto()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 322 | private pb::UnknownFieldSet _unknownFields; |
| 323 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 324 | public static pb::MessageParser<FileDescriptorProto> Parser { get { return _parser; } } |
| 325 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 326 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 327 | public static pbr::MessageDescriptor Descriptor { |
| 328 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[1]; } |
| 329 | } |
| 330 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 331 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 332 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 333 | get { return Descriptor; } |
| 334 | } |
| 335 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 336 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 337 | public FileDescriptorProto() { |
| 338 | OnConstruction(); |
| 339 | } |
| 340 | |
| 341 | partial void OnConstruction(); |
| 342 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 343 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 344 | public FileDescriptorProto(FileDescriptorProto other) : this() { |
| 345 | name_ = other.name_; |
| 346 | package_ = other.package_; |
| 347 | dependency_ = other.dependency_.Clone(); |
| 348 | publicDependency_ = other.publicDependency_.Clone(); |
| 349 | weakDependency_ = other.weakDependency_.Clone(); |
| 350 | messageType_ = other.messageType_.Clone(); |
| 351 | enumType_ = other.enumType_.Clone(); |
| 352 | service_ = other.service_.Clone(); |
| 353 | extension_ = other.extension_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 354 | options_ = other.options_ != null ? other.options_.Clone() : null; |
| 355 | sourceCodeInfo_ = other.sourceCodeInfo_ != null ? other.sourceCodeInfo_.Clone() : null; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 356 | syntax_ = other.syntax_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 357 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 358 | } |
| 359 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 360 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 361 | public FileDescriptorProto Clone() { |
| 362 | return new FileDescriptorProto(this); |
| 363 | } |
| 364 | |
| 365 | /// <summary>Field number for the "name" field.</summary> |
| 366 | public const int NameFieldNumber = 1; |
| 367 | private string name_ = ""; |
| 368 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 369 | /// file name, relative to root of source tree |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 370 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 371 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 372 | public string Name { |
| 373 | get { return name_; } |
| 374 | set { |
| 375 | name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | /// <summary>Field number for the "package" field.</summary> |
| 380 | public const int PackageFieldNumber = 2; |
| 381 | private string package_ = ""; |
| 382 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 383 | /// e.g. "foo", "foo.bar", etc. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 384 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 385 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 386 | public string Package { |
| 387 | get { return package_; } |
| 388 | set { |
| 389 | package_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | /// <summary>Field number for the "dependency" field.</summary> |
| 394 | public const int DependencyFieldNumber = 3; |
| 395 | private static readonly pb::FieldCodec<string> _repeated_dependency_codec |
| 396 | = pb::FieldCodec.ForString(26); |
| 397 | private readonly pbc::RepeatedField<string> dependency_ = new pbc::RepeatedField<string>(); |
| 398 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 399 | /// Names of files imported by this file. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 400 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 401 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 402 | public pbc::RepeatedField<string> Dependency { |
| 403 | get { return dependency_; } |
| 404 | } |
| 405 | |
| 406 | /// <summary>Field number for the "public_dependency" field.</summary> |
| 407 | public const int PublicDependencyFieldNumber = 10; |
| 408 | private static readonly pb::FieldCodec<int> _repeated_publicDependency_codec |
| 409 | = pb::FieldCodec.ForInt32(80); |
| 410 | private readonly pbc::RepeatedField<int> publicDependency_ = new pbc::RepeatedField<int>(); |
| 411 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 412 | /// Indexes of the public imported files in the dependency list above. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 413 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 414 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 415 | public pbc::RepeatedField<int> PublicDependency { |
| 416 | get { return publicDependency_; } |
| 417 | } |
| 418 | |
| 419 | /// <summary>Field number for the "weak_dependency" field.</summary> |
| 420 | public const int WeakDependencyFieldNumber = 11; |
| 421 | private static readonly pb::FieldCodec<int> _repeated_weakDependency_codec |
| 422 | = pb::FieldCodec.ForInt32(88); |
| 423 | private readonly pbc::RepeatedField<int> weakDependency_ = new pbc::RepeatedField<int>(); |
| 424 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 425 | /// Indexes of the weak imported files in the dependency list. |
| 426 | /// For Google-internal migration only. Do not use. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 427 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 428 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 429 | public pbc::RepeatedField<int> WeakDependency { |
| 430 | get { return weakDependency_; } |
| 431 | } |
| 432 | |
| 433 | /// <summary>Field number for the "message_type" field.</summary> |
| 434 | public const int MessageTypeFieldNumber = 4; |
| 435 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.DescriptorProto> _repeated_messageType_codec |
| 436 | = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.DescriptorProto.Parser); |
| 437 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto> messageType_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto>(); |
| 438 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 439 | /// All top-level definitions in this file. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 440 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 441 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 442 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto> MessageType { |
| 443 | get { return messageType_; } |
| 444 | } |
| 445 | |
| 446 | /// <summary>Field number for the "enum_type" field.</summary> |
| 447 | public const int EnumTypeFieldNumber = 5; |
| 448 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.EnumDescriptorProto> _repeated_enumType_codec |
| 449 | = pb::FieldCodec.ForMessage(42, global::Google.Protobuf.Reflection.EnumDescriptorProto.Parser); |
| 450 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumDescriptorProto> enumType_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumDescriptorProto>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 451 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 452 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumDescriptorProto> EnumType { |
| 453 | get { return enumType_; } |
| 454 | } |
| 455 | |
| 456 | /// <summary>Field number for the "service" field.</summary> |
| 457 | public const int ServiceFieldNumber = 6; |
| 458 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.ServiceDescriptorProto> _repeated_service_codec |
| 459 | = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.Reflection.ServiceDescriptorProto.Parser); |
| 460 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.ServiceDescriptorProto> service_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.ServiceDescriptorProto>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 461 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 462 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.ServiceDescriptorProto> Service { |
| 463 | get { return service_; } |
| 464 | } |
| 465 | |
| 466 | /// <summary>Field number for the "extension" field.</summary> |
| 467 | public const int ExtensionFieldNumber = 7; |
| 468 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.FieldDescriptorProto> _repeated_extension_codec |
| 469 | = pb::FieldCodec.ForMessage(58, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); |
| 470 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptorProto> extension_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptorProto>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 471 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 472 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptorProto> Extension { |
| 473 | get { return extension_; } |
| 474 | } |
| 475 | |
| 476 | /// <summary>Field number for the "options" field.</summary> |
| 477 | public const int OptionsFieldNumber = 8; |
| 478 | private global::Google.Protobuf.Reflection.FileOptions options_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 479 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 480 | public global::Google.Protobuf.Reflection.FileOptions Options { |
| 481 | get { return options_; } |
| 482 | set { |
| 483 | options_ = value; |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | /// <summary>Field number for the "source_code_info" field.</summary> |
| 488 | public const int SourceCodeInfoFieldNumber = 9; |
| 489 | private global::Google.Protobuf.Reflection.SourceCodeInfo sourceCodeInfo_; |
| 490 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 491 | /// This field contains optional information about the original source code. |
| 492 | /// You may safely remove this entire field without harming runtime |
| 493 | /// functionality of the descriptors -- the information is needed only by |
| 494 | /// development tools. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 495 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 496 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 497 | public global::Google.Protobuf.Reflection.SourceCodeInfo SourceCodeInfo { |
| 498 | get { return sourceCodeInfo_; } |
| 499 | set { |
| 500 | sourceCodeInfo_ = value; |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | /// <summary>Field number for the "syntax" field.</summary> |
| 505 | public const int SyntaxFieldNumber = 12; |
| 506 | private string syntax_ = ""; |
| 507 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 508 | /// The syntax of the proto file. |
| 509 | /// The supported values are "proto2" and "proto3". |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 510 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 511 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 512 | public string Syntax { |
| 513 | get { return syntax_; } |
| 514 | set { |
| 515 | syntax_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 516 | } |
| 517 | } |
| 518 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 519 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 520 | public override bool Equals(object other) { |
| 521 | return Equals(other as FileDescriptorProto); |
| 522 | } |
| 523 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 524 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 525 | public bool Equals(FileDescriptorProto other) { |
| 526 | if (ReferenceEquals(other, null)) { |
| 527 | return false; |
| 528 | } |
| 529 | if (ReferenceEquals(other, this)) { |
| 530 | return true; |
| 531 | } |
| 532 | if (Name != other.Name) return false; |
| 533 | if (Package != other.Package) return false; |
| 534 | if(!dependency_.Equals(other.dependency_)) return false; |
| 535 | if(!publicDependency_.Equals(other.publicDependency_)) return false; |
| 536 | if(!weakDependency_.Equals(other.weakDependency_)) return false; |
| 537 | if(!messageType_.Equals(other.messageType_)) return false; |
| 538 | if(!enumType_.Equals(other.enumType_)) return false; |
| 539 | if(!service_.Equals(other.service_)) return false; |
| 540 | if(!extension_.Equals(other.extension_)) return false; |
| 541 | if (!object.Equals(Options, other.Options)) return false; |
| 542 | if (!object.Equals(SourceCodeInfo, other.SourceCodeInfo)) return false; |
| 543 | if (Syntax != other.Syntax) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 544 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 545 | } |
| 546 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 547 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 548 | public override int GetHashCode() { |
| 549 | int hash = 1; |
| 550 | if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 551 | if (Package.Length != 0) hash ^= Package.GetHashCode(); |
| 552 | hash ^= dependency_.GetHashCode(); |
| 553 | hash ^= publicDependency_.GetHashCode(); |
| 554 | hash ^= weakDependency_.GetHashCode(); |
| 555 | hash ^= messageType_.GetHashCode(); |
| 556 | hash ^= enumType_.GetHashCode(); |
| 557 | hash ^= service_.GetHashCode(); |
| 558 | hash ^= extension_.GetHashCode(); |
| 559 | if (options_ != null) hash ^= Options.GetHashCode(); |
| 560 | if (sourceCodeInfo_ != null) hash ^= SourceCodeInfo.GetHashCode(); |
| 561 | if (Syntax.Length != 0) hash ^= Syntax.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 562 | if (_unknownFields != null) { |
| 563 | hash ^= _unknownFields.GetHashCode(); |
| 564 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 565 | return hash; |
| 566 | } |
| 567 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 568 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 569 | public override string ToString() { |
| 570 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 571 | } |
| 572 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 573 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 574 | public void WriteTo(pb::CodedOutputStream output) { |
| 575 | if (Name.Length != 0) { |
| 576 | output.WriteRawTag(10); |
| 577 | output.WriteString(Name); |
| 578 | } |
| 579 | if (Package.Length != 0) { |
| 580 | output.WriteRawTag(18); |
| 581 | output.WriteString(Package); |
| 582 | } |
| 583 | dependency_.WriteTo(output, _repeated_dependency_codec); |
| 584 | messageType_.WriteTo(output, _repeated_messageType_codec); |
| 585 | enumType_.WriteTo(output, _repeated_enumType_codec); |
| 586 | service_.WriteTo(output, _repeated_service_codec); |
| 587 | extension_.WriteTo(output, _repeated_extension_codec); |
| 588 | if (options_ != null) { |
| 589 | output.WriteRawTag(66); |
| 590 | output.WriteMessage(Options); |
| 591 | } |
| 592 | if (sourceCodeInfo_ != null) { |
| 593 | output.WriteRawTag(74); |
| 594 | output.WriteMessage(SourceCodeInfo); |
| 595 | } |
| 596 | publicDependency_.WriteTo(output, _repeated_publicDependency_codec); |
| 597 | weakDependency_.WriteTo(output, _repeated_weakDependency_codec); |
| 598 | if (Syntax.Length != 0) { |
| 599 | output.WriteRawTag(98); |
| 600 | output.WriteString(Syntax); |
| 601 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 602 | if (_unknownFields != null) { |
| 603 | _unknownFields.WriteTo(output); |
| 604 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 605 | } |
| 606 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 607 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 608 | public int CalculateSize() { |
| 609 | int size = 0; |
| 610 | if (Name.Length != 0) { |
| 611 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 612 | } |
| 613 | if (Package.Length != 0) { |
| 614 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Package); |
| 615 | } |
| 616 | size += dependency_.CalculateSize(_repeated_dependency_codec); |
| 617 | size += publicDependency_.CalculateSize(_repeated_publicDependency_codec); |
| 618 | size += weakDependency_.CalculateSize(_repeated_weakDependency_codec); |
| 619 | size += messageType_.CalculateSize(_repeated_messageType_codec); |
| 620 | size += enumType_.CalculateSize(_repeated_enumType_codec); |
| 621 | size += service_.CalculateSize(_repeated_service_codec); |
| 622 | size += extension_.CalculateSize(_repeated_extension_codec); |
| 623 | if (options_ != null) { |
| 624 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 625 | } |
| 626 | if (sourceCodeInfo_ != null) { |
| 627 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceCodeInfo); |
| 628 | } |
| 629 | if (Syntax.Length != 0) { |
| 630 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Syntax); |
| 631 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 632 | if (_unknownFields != null) { |
| 633 | size += _unknownFields.CalculateSize(); |
| 634 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 635 | return size; |
| 636 | } |
| 637 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 638 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 639 | public void MergeFrom(FileDescriptorProto other) { |
| 640 | if (other == null) { |
| 641 | return; |
| 642 | } |
| 643 | if (other.Name.Length != 0) { |
| 644 | Name = other.Name; |
| 645 | } |
| 646 | if (other.Package.Length != 0) { |
| 647 | Package = other.Package; |
| 648 | } |
| 649 | dependency_.Add(other.dependency_); |
| 650 | publicDependency_.Add(other.publicDependency_); |
| 651 | weakDependency_.Add(other.weakDependency_); |
| 652 | messageType_.Add(other.messageType_); |
| 653 | enumType_.Add(other.enumType_); |
| 654 | service_.Add(other.service_); |
| 655 | extension_.Add(other.extension_); |
| 656 | if (other.options_ != null) { |
| 657 | if (options_ == null) { |
| 658 | options_ = new global::Google.Protobuf.Reflection.FileOptions(); |
| 659 | } |
| 660 | Options.MergeFrom(other.Options); |
| 661 | } |
| 662 | if (other.sourceCodeInfo_ != null) { |
| 663 | if (sourceCodeInfo_ == null) { |
| 664 | sourceCodeInfo_ = new global::Google.Protobuf.Reflection.SourceCodeInfo(); |
| 665 | } |
| 666 | SourceCodeInfo.MergeFrom(other.SourceCodeInfo); |
| 667 | } |
| 668 | if (other.Syntax.Length != 0) { |
| 669 | Syntax = other.Syntax; |
| 670 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 671 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 672 | } |
| 673 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 674 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 675 | public void MergeFrom(pb::CodedInputStream input) { |
| 676 | uint tag; |
| 677 | while ((tag = input.ReadTag()) != 0) { |
| 678 | switch(tag) { |
| 679 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 680 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 681 | break; |
| 682 | case 10: { |
| 683 | Name = input.ReadString(); |
| 684 | break; |
| 685 | } |
| 686 | case 18: { |
| 687 | Package = input.ReadString(); |
| 688 | break; |
| 689 | } |
| 690 | case 26: { |
| 691 | dependency_.AddEntriesFrom(input, _repeated_dependency_codec); |
| 692 | break; |
| 693 | } |
| 694 | case 34: { |
| 695 | messageType_.AddEntriesFrom(input, _repeated_messageType_codec); |
| 696 | break; |
| 697 | } |
| 698 | case 42: { |
| 699 | enumType_.AddEntriesFrom(input, _repeated_enumType_codec); |
| 700 | break; |
| 701 | } |
| 702 | case 50: { |
| 703 | service_.AddEntriesFrom(input, _repeated_service_codec); |
| 704 | break; |
| 705 | } |
| 706 | case 58: { |
| 707 | extension_.AddEntriesFrom(input, _repeated_extension_codec); |
| 708 | break; |
| 709 | } |
| 710 | case 66: { |
| 711 | if (options_ == null) { |
| 712 | options_ = new global::Google.Protobuf.Reflection.FileOptions(); |
| 713 | } |
| 714 | input.ReadMessage(options_); |
| 715 | break; |
| 716 | } |
| 717 | case 74: { |
| 718 | if (sourceCodeInfo_ == null) { |
| 719 | sourceCodeInfo_ = new global::Google.Protobuf.Reflection.SourceCodeInfo(); |
| 720 | } |
| 721 | input.ReadMessage(sourceCodeInfo_); |
| 722 | break; |
| 723 | } |
| 724 | case 82: |
| 725 | case 80: { |
| 726 | publicDependency_.AddEntriesFrom(input, _repeated_publicDependency_codec); |
| 727 | break; |
| 728 | } |
| 729 | case 90: |
| 730 | case 88: { |
| 731 | weakDependency_.AddEntriesFrom(input, _repeated_weakDependency_codec); |
| 732 | break; |
| 733 | } |
| 734 | case 98: { |
| 735 | Syntax = input.ReadString(); |
| 736 | break; |
| 737 | } |
| 738 | } |
| 739 | } |
| 740 | } |
| 741 | |
| 742 | } |
| 743 | |
| 744 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 745 | /// Describes a message type. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 746 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 747 | internal sealed partial class DescriptorProto : pb::IMessage<DescriptorProto> { |
| 748 | private static readonly pb::MessageParser<DescriptorProto> _parser = new pb::MessageParser<DescriptorProto>(() => new DescriptorProto()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 749 | private pb::UnknownFieldSet _unknownFields; |
| 750 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 751 | public static pb::MessageParser<DescriptorProto> Parser { get { return _parser; } } |
| 752 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 753 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 754 | public static pbr::MessageDescriptor Descriptor { |
| 755 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[2]; } |
| 756 | } |
| 757 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 758 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 759 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 760 | get { return Descriptor; } |
| 761 | } |
| 762 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 763 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 764 | public DescriptorProto() { |
| 765 | OnConstruction(); |
| 766 | } |
| 767 | |
| 768 | partial void OnConstruction(); |
| 769 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 770 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 771 | public DescriptorProto(DescriptorProto other) : this() { |
| 772 | name_ = other.name_; |
| 773 | field_ = other.field_.Clone(); |
| 774 | extension_ = other.extension_.Clone(); |
| 775 | nestedType_ = other.nestedType_.Clone(); |
| 776 | enumType_ = other.enumType_.Clone(); |
| 777 | extensionRange_ = other.extensionRange_.Clone(); |
| 778 | oneofDecl_ = other.oneofDecl_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 779 | options_ = other.options_ != null ? other.options_.Clone() : null; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 780 | reservedRange_ = other.reservedRange_.Clone(); |
| 781 | reservedName_ = other.reservedName_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 782 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 783 | } |
| 784 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 785 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 786 | public DescriptorProto Clone() { |
| 787 | return new DescriptorProto(this); |
| 788 | } |
| 789 | |
| 790 | /// <summary>Field number for the "name" field.</summary> |
| 791 | public const int NameFieldNumber = 1; |
| 792 | private string name_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 793 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 794 | public string Name { |
| 795 | get { return name_; } |
| 796 | set { |
| 797 | name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 798 | } |
| 799 | } |
| 800 | |
| 801 | /// <summary>Field number for the "field" field.</summary> |
| 802 | public const int FieldFieldNumber = 2; |
| 803 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.FieldDescriptorProto> _repeated_field_codec |
| 804 | = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); |
| 805 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptorProto> field_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptorProto>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 806 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 807 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptorProto> Field { |
| 808 | get { return field_; } |
| 809 | } |
| 810 | |
| 811 | /// <summary>Field number for the "extension" field.</summary> |
| 812 | public const int ExtensionFieldNumber = 6; |
| 813 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.FieldDescriptorProto> _repeated_extension_codec |
| 814 | = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); |
| 815 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptorProto> extension_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptorProto>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 816 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 817 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptorProto> Extension { |
| 818 | get { return extension_; } |
| 819 | } |
| 820 | |
| 821 | /// <summary>Field number for the "nested_type" field.</summary> |
| 822 | public const int NestedTypeFieldNumber = 3; |
| 823 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.DescriptorProto> _repeated_nestedType_codec |
| 824 | = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.Reflection.DescriptorProto.Parser); |
| 825 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto> nestedType_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 826 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 827 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto> NestedType { |
| 828 | get { return nestedType_; } |
| 829 | } |
| 830 | |
| 831 | /// <summary>Field number for the "enum_type" field.</summary> |
| 832 | public const int EnumTypeFieldNumber = 4; |
| 833 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.EnumDescriptorProto> _repeated_enumType_codec |
| 834 | = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.EnumDescriptorProto.Parser); |
| 835 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumDescriptorProto> enumType_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumDescriptorProto>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 836 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 837 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumDescriptorProto> EnumType { |
| 838 | get { return enumType_; } |
| 839 | } |
| 840 | |
| 841 | /// <summary>Field number for the "extension_range" field.</summary> |
| 842 | public const int ExtensionRangeFieldNumber = 5; |
| 843 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange> _repeated_extensionRange_codec |
| 844 | = pb::FieldCodec.ForMessage(42, global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange.Parser); |
| 845 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange> extensionRange_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 846 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 847 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange> ExtensionRange { |
| 848 | get { return extensionRange_; } |
| 849 | } |
| 850 | |
| 851 | /// <summary>Field number for the "oneof_decl" field.</summary> |
| 852 | public const int OneofDeclFieldNumber = 8; |
| 853 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.OneofDescriptorProto> _repeated_oneofDecl_codec |
| 854 | = pb::FieldCodec.ForMessage(66, global::Google.Protobuf.Reflection.OneofDescriptorProto.Parser); |
| 855 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.OneofDescriptorProto> oneofDecl_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.OneofDescriptorProto>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 856 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 857 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.OneofDescriptorProto> OneofDecl { |
| 858 | get { return oneofDecl_; } |
| 859 | } |
| 860 | |
| 861 | /// <summary>Field number for the "options" field.</summary> |
| 862 | public const int OptionsFieldNumber = 7; |
| 863 | private global::Google.Protobuf.Reflection.MessageOptions options_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 864 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 865 | public global::Google.Protobuf.Reflection.MessageOptions Options { |
| 866 | get { return options_; } |
| 867 | set { |
| 868 | options_ = value; |
| 869 | } |
| 870 | } |
| 871 | |
| 872 | /// <summary>Field number for the "reserved_range" field.</summary> |
| 873 | public const int ReservedRangeFieldNumber = 9; |
| 874 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange> _repeated_reservedRange_codec |
| 875 | = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange.Parser); |
| 876 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange> reservedRange_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 877 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 878 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange> ReservedRange { |
| 879 | get { return reservedRange_; } |
| 880 | } |
| 881 | |
| 882 | /// <summary>Field number for the "reserved_name" field.</summary> |
| 883 | public const int ReservedNameFieldNumber = 10; |
| 884 | private static readonly pb::FieldCodec<string> _repeated_reservedName_codec |
| 885 | = pb::FieldCodec.ForString(82); |
| 886 | private readonly pbc::RepeatedField<string> reservedName_ = new pbc::RepeatedField<string>(); |
| 887 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 888 | /// Reserved field names, which may not be used by fields in the same message. |
| 889 | /// A given name may only be reserved once. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 890 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 891 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 892 | public pbc::RepeatedField<string> ReservedName { |
| 893 | get { return reservedName_; } |
| 894 | } |
| 895 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 896 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 897 | public override bool Equals(object other) { |
| 898 | return Equals(other as DescriptorProto); |
| 899 | } |
| 900 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 901 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 902 | public bool Equals(DescriptorProto other) { |
| 903 | if (ReferenceEquals(other, null)) { |
| 904 | return false; |
| 905 | } |
| 906 | if (ReferenceEquals(other, this)) { |
| 907 | return true; |
| 908 | } |
| 909 | if (Name != other.Name) return false; |
| 910 | if(!field_.Equals(other.field_)) return false; |
| 911 | if(!extension_.Equals(other.extension_)) return false; |
| 912 | if(!nestedType_.Equals(other.nestedType_)) return false; |
| 913 | if(!enumType_.Equals(other.enumType_)) return false; |
| 914 | if(!extensionRange_.Equals(other.extensionRange_)) return false; |
| 915 | if(!oneofDecl_.Equals(other.oneofDecl_)) return false; |
| 916 | if (!object.Equals(Options, other.Options)) return false; |
| 917 | if(!reservedRange_.Equals(other.reservedRange_)) return false; |
| 918 | if(!reservedName_.Equals(other.reservedName_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 919 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 920 | } |
| 921 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 922 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 923 | public override int GetHashCode() { |
| 924 | int hash = 1; |
| 925 | if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 926 | hash ^= field_.GetHashCode(); |
| 927 | hash ^= extension_.GetHashCode(); |
| 928 | hash ^= nestedType_.GetHashCode(); |
| 929 | hash ^= enumType_.GetHashCode(); |
| 930 | hash ^= extensionRange_.GetHashCode(); |
| 931 | hash ^= oneofDecl_.GetHashCode(); |
| 932 | if (options_ != null) hash ^= Options.GetHashCode(); |
| 933 | hash ^= reservedRange_.GetHashCode(); |
| 934 | hash ^= reservedName_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 935 | if (_unknownFields != null) { |
| 936 | hash ^= _unknownFields.GetHashCode(); |
| 937 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 938 | return hash; |
| 939 | } |
| 940 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 941 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 942 | public override string ToString() { |
| 943 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 944 | } |
| 945 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 946 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 947 | public void WriteTo(pb::CodedOutputStream output) { |
| 948 | if (Name.Length != 0) { |
| 949 | output.WriteRawTag(10); |
| 950 | output.WriteString(Name); |
| 951 | } |
| 952 | field_.WriteTo(output, _repeated_field_codec); |
| 953 | nestedType_.WriteTo(output, _repeated_nestedType_codec); |
| 954 | enumType_.WriteTo(output, _repeated_enumType_codec); |
| 955 | extensionRange_.WriteTo(output, _repeated_extensionRange_codec); |
| 956 | extension_.WriteTo(output, _repeated_extension_codec); |
| 957 | if (options_ != null) { |
| 958 | output.WriteRawTag(58); |
| 959 | output.WriteMessage(Options); |
| 960 | } |
| 961 | oneofDecl_.WriteTo(output, _repeated_oneofDecl_codec); |
| 962 | reservedRange_.WriteTo(output, _repeated_reservedRange_codec); |
| 963 | reservedName_.WriteTo(output, _repeated_reservedName_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 964 | if (_unknownFields != null) { |
| 965 | _unknownFields.WriteTo(output); |
| 966 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 967 | } |
| 968 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 969 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 970 | public int CalculateSize() { |
| 971 | int size = 0; |
| 972 | if (Name.Length != 0) { |
| 973 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 974 | } |
| 975 | size += field_.CalculateSize(_repeated_field_codec); |
| 976 | size += extension_.CalculateSize(_repeated_extension_codec); |
| 977 | size += nestedType_.CalculateSize(_repeated_nestedType_codec); |
| 978 | size += enumType_.CalculateSize(_repeated_enumType_codec); |
| 979 | size += extensionRange_.CalculateSize(_repeated_extensionRange_codec); |
| 980 | size += oneofDecl_.CalculateSize(_repeated_oneofDecl_codec); |
| 981 | if (options_ != null) { |
| 982 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 983 | } |
| 984 | size += reservedRange_.CalculateSize(_repeated_reservedRange_codec); |
| 985 | size += reservedName_.CalculateSize(_repeated_reservedName_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 986 | if (_unknownFields != null) { |
| 987 | size += _unknownFields.CalculateSize(); |
| 988 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 989 | return size; |
| 990 | } |
| 991 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 992 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 993 | public void MergeFrom(DescriptorProto other) { |
| 994 | if (other == null) { |
| 995 | return; |
| 996 | } |
| 997 | if (other.Name.Length != 0) { |
| 998 | Name = other.Name; |
| 999 | } |
| 1000 | field_.Add(other.field_); |
| 1001 | extension_.Add(other.extension_); |
| 1002 | nestedType_.Add(other.nestedType_); |
| 1003 | enumType_.Add(other.enumType_); |
| 1004 | extensionRange_.Add(other.extensionRange_); |
| 1005 | oneofDecl_.Add(other.oneofDecl_); |
| 1006 | if (other.options_ != null) { |
| 1007 | if (options_ == null) { |
| 1008 | options_ = new global::Google.Protobuf.Reflection.MessageOptions(); |
| 1009 | } |
| 1010 | Options.MergeFrom(other.Options); |
| 1011 | } |
| 1012 | reservedRange_.Add(other.reservedRange_); |
| 1013 | reservedName_.Add(other.reservedName_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1014 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1015 | } |
| 1016 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1017 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1018 | public void MergeFrom(pb::CodedInputStream input) { |
| 1019 | uint tag; |
| 1020 | while ((tag = input.ReadTag()) != 0) { |
| 1021 | switch(tag) { |
| 1022 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1023 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1024 | break; |
| 1025 | case 10: { |
| 1026 | Name = input.ReadString(); |
| 1027 | break; |
| 1028 | } |
| 1029 | case 18: { |
| 1030 | field_.AddEntriesFrom(input, _repeated_field_codec); |
| 1031 | break; |
| 1032 | } |
| 1033 | case 26: { |
| 1034 | nestedType_.AddEntriesFrom(input, _repeated_nestedType_codec); |
| 1035 | break; |
| 1036 | } |
| 1037 | case 34: { |
| 1038 | enumType_.AddEntriesFrom(input, _repeated_enumType_codec); |
| 1039 | break; |
| 1040 | } |
| 1041 | case 42: { |
| 1042 | extensionRange_.AddEntriesFrom(input, _repeated_extensionRange_codec); |
| 1043 | break; |
| 1044 | } |
| 1045 | case 50: { |
| 1046 | extension_.AddEntriesFrom(input, _repeated_extension_codec); |
| 1047 | break; |
| 1048 | } |
| 1049 | case 58: { |
| 1050 | if (options_ == null) { |
| 1051 | options_ = new global::Google.Protobuf.Reflection.MessageOptions(); |
| 1052 | } |
| 1053 | input.ReadMessage(options_); |
| 1054 | break; |
| 1055 | } |
| 1056 | case 66: { |
| 1057 | oneofDecl_.AddEntriesFrom(input, _repeated_oneofDecl_codec); |
| 1058 | break; |
| 1059 | } |
| 1060 | case 74: { |
| 1061 | reservedRange_.AddEntriesFrom(input, _repeated_reservedRange_codec); |
| 1062 | break; |
| 1063 | } |
| 1064 | case 82: { |
| 1065 | reservedName_.AddEntriesFrom(input, _repeated_reservedName_codec); |
| 1066 | break; |
| 1067 | } |
| 1068 | } |
| 1069 | } |
| 1070 | } |
| 1071 | |
| 1072 | #region Nested types |
| 1073 | /// <summary>Container for nested types declared in the DescriptorProto message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1074 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1075 | public static partial class Types { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1076 | internal sealed partial class ExtensionRange : pb::IMessage<ExtensionRange> { |
| 1077 | private static readonly pb::MessageParser<ExtensionRange> _parser = new pb::MessageParser<ExtensionRange>(() => new ExtensionRange()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1078 | private pb::UnknownFieldSet _unknownFields; |
| 1079 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1080 | public static pb::MessageParser<ExtensionRange> Parser { get { return _parser; } } |
| 1081 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1082 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1083 | public static pbr::MessageDescriptor Descriptor { |
| 1084 | get { return global::Google.Protobuf.Reflection.DescriptorProto.Descriptor.NestedTypes[0]; } |
| 1085 | } |
| 1086 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1087 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1088 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1089 | get { return Descriptor; } |
| 1090 | } |
| 1091 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1092 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1093 | public ExtensionRange() { |
| 1094 | OnConstruction(); |
| 1095 | } |
| 1096 | |
| 1097 | partial void OnConstruction(); |
| 1098 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1099 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1100 | public ExtensionRange(ExtensionRange other) : this() { |
| 1101 | start_ = other.start_; |
| 1102 | end_ = other.end_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1103 | options_ = other.options_ != null ? other.options_.Clone() : null; |
| 1104 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1105 | } |
| 1106 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1107 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1108 | public ExtensionRange Clone() { |
| 1109 | return new ExtensionRange(this); |
| 1110 | } |
| 1111 | |
| 1112 | /// <summary>Field number for the "start" field.</summary> |
| 1113 | public const int StartFieldNumber = 1; |
| 1114 | private int start_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1115 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1116 | public int Start { |
| 1117 | get { return start_; } |
| 1118 | set { |
| 1119 | start_ = value; |
| 1120 | } |
| 1121 | } |
| 1122 | |
| 1123 | /// <summary>Field number for the "end" field.</summary> |
| 1124 | public const int EndFieldNumber = 2; |
| 1125 | private int end_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1126 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1127 | public int End { |
| 1128 | get { return end_; } |
| 1129 | set { |
| 1130 | end_ = value; |
| 1131 | } |
| 1132 | } |
| 1133 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1134 | /// <summary>Field number for the "options" field.</summary> |
| 1135 | public const int OptionsFieldNumber = 3; |
| 1136 | private global::Google.Protobuf.Reflection.ExtensionRangeOptions options_; |
| 1137 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1138 | public global::Google.Protobuf.Reflection.ExtensionRangeOptions Options { |
| 1139 | get { return options_; } |
| 1140 | set { |
| 1141 | options_ = value; |
| 1142 | } |
| 1143 | } |
| 1144 | |
| 1145 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1146 | public override bool Equals(object other) { |
| 1147 | return Equals(other as ExtensionRange); |
| 1148 | } |
| 1149 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1150 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1151 | public bool Equals(ExtensionRange other) { |
| 1152 | if (ReferenceEquals(other, null)) { |
| 1153 | return false; |
| 1154 | } |
| 1155 | if (ReferenceEquals(other, this)) { |
| 1156 | return true; |
| 1157 | } |
| 1158 | if (Start != other.Start) return false; |
| 1159 | if (End != other.End) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1160 | if (!object.Equals(Options, other.Options)) return false; |
| 1161 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1162 | } |
| 1163 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1164 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1165 | public override int GetHashCode() { |
| 1166 | int hash = 1; |
| 1167 | if (Start != 0) hash ^= Start.GetHashCode(); |
| 1168 | if (End != 0) hash ^= End.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1169 | if (options_ != null) hash ^= Options.GetHashCode(); |
| 1170 | if (_unknownFields != null) { |
| 1171 | hash ^= _unknownFields.GetHashCode(); |
| 1172 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1173 | return hash; |
| 1174 | } |
| 1175 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1176 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1177 | public override string ToString() { |
| 1178 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1179 | } |
| 1180 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1181 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1182 | public void WriteTo(pb::CodedOutputStream output) { |
| 1183 | if (Start != 0) { |
| 1184 | output.WriteRawTag(8); |
| 1185 | output.WriteInt32(Start); |
| 1186 | } |
| 1187 | if (End != 0) { |
| 1188 | output.WriteRawTag(16); |
| 1189 | output.WriteInt32(End); |
| 1190 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1191 | if (options_ != null) { |
| 1192 | output.WriteRawTag(26); |
| 1193 | output.WriteMessage(Options); |
| 1194 | } |
| 1195 | if (_unknownFields != null) { |
| 1196 | _unknownFields.WriteTo(output); |
| 1197 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1198 | } |
| 1199 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1200 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1201 | public int CalculateSize() { |
| 1202 | int size = 0; |
| 1203 | if (Start != 0) { |
| 1204 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Start); |
| 1205 | } |
| 1206 | if (End != 0) { |
| 1207 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(End); |
| 1208 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1209 | if (options_ != null) { |
| 1210 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 1211 | } |
| 1212 | if (_unknownFields != null) { |
| 1213 | size += _unknownFields.CalculateSize(); |
| 1214 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1215 | return size; |
| 1216 | } |
| 1217 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1218 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1219 | public void MergeFrom(ExtensionRange other) { |
| 1220 | if (other == null) { |
| 1221 | return; |
| 1222 | } |
| 1223 | if (other.Start != 0) { |
| 1224 | Start = other.Start; |
| 1225 | } |
| 1226 | if (other.End != 0) { |
| 1227 | End = other.End; |
| 1228 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1229 | if (other.options_ != null) { |
| 1230 | if (options_ == null) { |
| 1231 | options_ = new global::Google.Protobuf.Reflection.ExtensionRangeOptions(); |
| 1232 | } |
| 1233 | Options.MergeFrom(other.Options); |
| 1234 | } |
| 1235 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1236 | } |
| 1237 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1238 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1239 | public void MergeFrom(pb::CodedInputStream input) { |
| 1240 | uint tag; |
| 1241 | while ((tag = input.ReadTag()) != 0) { |
| 1242 | switch(tag) { |
| 1243 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1244 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1245 | break; |
| 1246 | case 8: { |
| 1247 | Start = input.ReadInt32(); |
| 1248 | break; |
| 1249 | } |
| 1250 | case 16: { |
| 1251 | End = input.ReadInt32(); |
| 1252 | break; |
| 1253 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1254 | case 26: { |
| 1255 | if (options_ == null) { |
| 1256 | options_ = new global::Google.Protobuf.Reflection.ExtensionRangeOptions(); |
| 1257 | } |
| 1258 | input.ReadMessage(options_); |
| 1259 | break; |
| 1260 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1261 | } |
| 1262 | } |
| 1263 | } |
| 1264 | |
| 1265 | } |
| 1266 | |
| 1267 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1268 | /// Range of reserved tag numbers. Reserved tag numbers may not be used by |
| 1269 | /// fields or extension ranges in the same message. Reserved ranges may |
| 1270 | /// not overlap. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1271 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1272 | internal sealed partial class ReservedRange : pb::IMessage<ReservedRange> { |
| 1273 | private static readonly pb::MessageParser<ReservedRange> _parser = new pb::MessageParser<ReservedRange>(() => new ReservedRange()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1274 | private pb::UnknownFieldSet _unknownFields; |
| 1275 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1276 | public static pb::MessageParser<ReservedRange> Parser { get { return _parser; } } |
| 1277 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1278 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1279 | public static pbr::MessageDescriptor Descriptor { |
| 1280 | get { return global::Google.Protobuf.Reflection.DescriptorProto.Descriptor.NestedTypes[1]; } |
| 1281 | } |
| 1282 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1283 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1284 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1285 | get { return Descriptor; } |
| 1286 | } |
| 1287 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1288 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1289 | public ReservedRange() { |
| 1290 | OnConstruction(); |
| 1291 | } |
| 1292 | |
| 1293 | partial void OnConstruction(); |
| 1294 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1295 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1296 | public ReservedRange(ReservedRange other) : this() { |
| 1297 | start_ = other.start_; |
| 1298 | end_ = other.end_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1299 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1300 | } |
| 1301 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1302 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1303 | public ReservedRange Clone() { |
| 1304 | return new ReservedRange(this); |
| 1305 | } |
| 1306 | |
| 1307 | /// <summary>Field number for the "start" field.</summary> |
| 1308 | public const int StartFieldNumber = 1; |
| 1309 | private int start_; |
| 1310 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1311 | /// Inclusive. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1312 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1313 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1314 | public int Start { |
| 1315 | get { return start_; } |
| 1316 | set { |
| 1317 | start_ = value; |
| 1318 | } |
| 1319 | } |
| 1320 | |
| 1321 | /// <summary>Field number for the "end" field.</summary> |
| 1322 | public const int EndFieldNumber = 2; |
| 1323 | private int end_; |
| 1324 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1325 | /// Exclusive. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1326 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1327 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1328 | public int End { |
| 1329 | get { return end_; } |
| 1330 | set { |
| 1331 | end_ = value; |
| 1332 | } |
| 1333 | } |
| 1334 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1335 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1336 | public override bool Equals(object other) { |
| 1337 | return Equals(other as ReservedRange); |
| 1338 | } |
| 1339 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1340 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1341 | public bool Equals(ReservedRange other) { |
| 1342 | if (ReferenceEquals(other, null)) { |
| 1343 | return false; |
| 1344 | } |
| 1345 | if (ReferenceEquals(other, this)) { |
| 1346 | return true; |
| 1347 | } |
| 1348 | if (Start != other.Start) return false; |
| 1349 | if (End != other.End) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1350 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1351 | } |
| 1352 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1353 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1354 | public override int GetHashCode() { |
| 1355 | int hash = 1; |
| 1356 | if (Start != 0) hash ^= Start.GetHashCode(); |
| 1357 | if (End != 0) hash ^= End.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1358 | if (_unknownFields != null) { |
| 1359 | hash ^= _unknownFields.GetHashCode(); |
| 1360 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1361 | return hash; |
| 1362 | } |
| 1363 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1364 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1365 | public override string ToString() { |
| 1366 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1367 | } |
| 1368 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1369 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1370 | public void WriteTo(pb::CodedOutputStream output) { |
| 1371 | if (Start != 0) { |
| 1372 | output.WriteRawTag(8); |
| 1373 | output.WriteInt32(Start); |
| 1374 | } |
| 1375 | if (End != 0) { |
| 1376 | output.WriteRawTag(16); |
| 1377 | output.WriteInt32(End); |
| 1378 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1379 | if (_unknownFields != null) { |
| 1380 | _unknownFields.WriteTo(output); |
| 1381 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1382 | } |
| 1383 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1384 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1385 | public int CalculateSize() { |
| 1386 | int size = 0; |
| 1387 | if (Start != 0) { |
| 1388 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Start); |
| 1389 | } |
| 1390 | if (End != 0) { |
| 1391 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(End); |
| 1392 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1393 | if (_unknownFields != null) { |
| 1394 | size += _unknownFields.CalculateSize(); |
| 1395 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1396 | return size; |
| 1397 | } |
| 1398 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1399 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1400 | public void MergeFrom(ReservedRange other) { |
| 1401 | if (other == null) { |
| 1402 | return; |
| 1403 | } |
| 1404 | if (other.Start != 0) { |
| 1405 | Start = other.Start; |
| 1406 | } |
| 1407 | if (other.End != 0) { |
| 1408 | End = other.End; |
| 1409 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1410 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1411 | } |
| 1412 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1413 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1414 | public void MergeFrom(pb::CodedInputStream input) { |
| 1415 | uint tag; |
| 1416 | while ((tag = input.ReadTag()) != 0) { |
| 1417 | switch(tag) { |
| 1418 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1419 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1420 | break; |
| 1421 | case 8: { |
| 1422 | Start = input.ReadInt32(); |
| 1423 | break; |
| 1424 | } |
| 1425 | case 16: { |
| 1426 | End = input.ReadInt32(); |
| 1427 | break; |
| 1428 | } |
| 1429 | } |
| 1430 | } |
| 1431 | } |
| 1432 | |
| 1433 | } |
| 1434 | |
| 1435 | } |
| 1436 | #endregion |
| 1437 | |
| 1438 | } |
| 1439 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1440 | internal sealed partial class ExtensionRangeOptions : pb::IMessage<ExtensionRangeOptions> { |
| 1441 | private static readonly pb::MessageParser<ExtensionRangeOptions> _parser = new pb::MessageParser<ExtensionRangeOptions>(() => new ExtensionRangeOptions()); |
| 1442 | private pb::UnknownFieldSet _unknownFields; |
| 1443 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1444 | public static pb::MessageParser<ExtensionRangeOptions> Parser { get { return _parser; } } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1445 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1446 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1447 | public static pbr::MessageDescriptor Descriptor { |
| 1448 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[3]; } |
| 1449 | } |
| 1450 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1451 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1452 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1453 | get { return Descriptor; } |
| 1454 | } |
| 1455 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1456 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1457 | public ExtensionRangeOptions() { |
| 1458 | OnConstruction(); |
| 1459 | } |
| 1460 | |
| 1461 | partial void OnConstruction(); |
| 1462 | |
| 1463 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1464 | public ExtensionRangeOptions(ExtensionRangeOptions other) : this() { |
| 1465 | uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
| 1466 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
| 1467 | } |
| 1468 | |
| 1469 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1470 | public ExtensionRangeOptions Clone() { |
| 1471 | return new ExtensionRangeOptions(this); |
| 1472 | } |
| 1473 | |
| 1474 | /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 1475 | public const int UninterpretedOptionFieldNumber = 999; |
| 1476 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec |
| 1477 | = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); |
| 1478 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); |
| 1479 | /// <summary> |
| 1480 | /// The parser stores options it doesn't recognize here. See above. |
| 1481 | /// </summary> |
| 1482 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1483 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { |
| 1484 | get { return uninterpretedOption_; } |
| 1485 | } |
| 1486 | |
| 1487 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1488 | public override bool Equals(object other) { |
| 1489 | return Equals(other as ExtensionRangeOptions); |
| 1490 | } |
| 1491 | |
| 1492 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1493 | public bool Equals(ExtensionRangeOptions other) { |
| 1494 | if (ReferenceEquals(other, null)) { |
| 1495 | return false; |
| 1496 | } |
| 1497 | if (ReferenceEquals(other, this)) { |
| 1498 | return true; |
| 1499 | } |
| 1500 | if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
| 1501 | return Equals(_unknownFields, other._unknownFields); |
| 1502 | } |
| 1503 | |
| 1504 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1505 | public override int GetHashCode() { |
| 1506 | int hash = 1; |
| 1507 | hash ^= uninterpretedOption_.GetHashCode(); |
| 1508 | if (_unknownFields != null) { |
| 1509 | hash ^= _unknownFields.GetHashCode(); |
| 1510 | } |
| 1511 | return hash; |
| 1512 | } |
| 1513 | |
| 1514 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1515 | public override string ToString() { |
| 1516 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1517 | } |
| 1518 | |
| 1519 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1520 | public void WriteTo(pb::CodedOutputStream output) { |
| 1521 | uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
| 1522 | if (_unknownFields != null) { |
| 1523 | _unknownFields.WriteTo(output); |
| 1524 | } |
| 1525 | } |
| 1526 | |
| 1527 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1528 | public int CalculateSize() { |
| 1529 | int size = 0; |
| 1530 | size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); |
| 1531 | if (_unknownFields != null) { |
| 1532 | size += _unknownFields.CalculateSize(); |
| 1533 | } |
| 1534 | return size; |
| 1535 | } |
| 1536 | |
| 1537 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1538 | public void MergeFrom(ExtensionRangeOptions other) { |
| 1539 | if (other == null) { |
| 1540 | return; |
| 1541 | } |
| 1542 | uninterpretedOption_.Add(other.uninterpretedOption_); |
| 1543 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
| 1544 | } |
| 1545 | |
| 1546 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1547 | public void MergeFrom(pb::CodedInputStream input) { |
| 1548 | uint tag; |
| 1549 | while ((tag = input.ReadTag()) != 0) { |
| 1550 | switch(tag) { |
| 1551 | default: |
| 1552 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
| 1553 | break; |
| 1554 | case 7994: { |
| 1555 | uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec); |
| 1556 | break; |
| 1557 | } |
| 1558 | } |
| 1559 | } |
| 1560 | } |
| 1561 | |
| 1562 | } |
| 1563 | |
| 1564 | /// <summary> |
| 1565 | /// Describes a field within a message. |
| 1566 | /// </summary> |
| 1567 | internal sealed partial class FieldDescriptorProto : pb::IMessage<FieldDescriptorProto> { |
| 1568 | private static readonly pb::MessageParser<FieldDescriptorProto> _parser = new pb::MessageParser<FieldDescriptorProto>(() => new FieldDescriptorProto()); |
| 1569 | private pb::UnknownFieldSet _unknownFields; |
| 1570 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1571 | public static pb::MessageParser<FieldDescriptorProto> Parser { get { return _parser; } } |
| 1572 | |
| 1573 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1574 | public static pbr::MessageDescriptor Descriptor { |
| 1575 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[4]; } |
| 1576 | } |
| 1577 | |
| 1578 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 1579 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1580 | get { return Descriptor; } |
| 1581 | } |
| 1582 | |
| 1583 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1584 | public FieldDescriptorProto() { |
| 1585 | OnConstruction(); |
| 1586 | } |
| 1587 | |
| 1588 | partial void OnConstruction(); |
| 1589 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1590 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1591 | public FieldDescriptorProto(FieldDescriptorProto other) : this() { |
| 1592 | name_ = other.name_; |
| 1593 | number_ = other.number_; |
| 1594 | label_ = other.label_; |
| 1595 | type_ = other.type_; |
| 1596 | typeName_ = other.typeName_; |
| 1597 | extendee_ = other.extendee_; |
| 1598 | defaultValue_ = other.defaultValue_; |
| 1599 | oneofIndex_ = other.oneofIndex_; |
| 1600 | jsonName_ = other.jsonName_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1601 | options_ = other.options_ != null ? other.options_.Clone() : null; |
| 1602 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1603 | } |
| 1604 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1605 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1606 | public FieldDescriptorProto Clone() { |
| 1607 | return new FieldDescriptorProto(this); |
| 1608 | } |
| 1609 | |
| 1610 | /// <summary>Field number for the "name" field.</summary> |
| 1611 | public const int NameFieldNumber = 1; |
| 1612 | private string name_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1613 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1614 | public string Name { |
| 1615 | get { return name_; } |
| 1616 | set { |
| 1617 | name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1618 | } |
| 1619 | } |
| 1620 | |
| 1621 | /// <summary>Field number for the "number" field.</summary> |
| 1622 | public const int NumberFieldNumber = 3; |
| 1623 | private int number_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1624 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1625 | public int Number { |
| 1626 | get { return number_; } |
| 1627 | set { |
| 1628 | number_ = value; |
| 1629 | } |
| 1630 | } |
| 1631 | |
| 1632 | /// <summary>Field number for the "label" field.</summary> |
| 1633 | public const int LabelFieldNumber = 4; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1634 | private global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label label_ = 0; |
| 1635 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1636 | public global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label Label { |
| 1637 | get { return label_; } |
| 1638 | set { |
| 1639 | label_ = value; |
| 1640 | } |
| 1641 | } |
| 1642 | |
| 1643 | /// <summary>Field number for the "type" field.</summary> |
| 1644 | public const int TypeFieldNumber = 5; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1645 | private global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type type_ = 0; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1646 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1647 | /// If type_name is set, this need not be set. If both this and type_name |
| 1648 | /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1649 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1650 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1651 | public global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type Type { |
| 1652 | get { return type_; } |
| 1653 | set { |
| 1654 | type_ = value; |
| 1655 | } |
| 1656 | } |
| 1657 | |
| 1658 | /// <summary>Field number for the "type_name" field.</summary> |
| 1659 | public const int TypeNameFieldNumber = 6; |
| 1660 | private string typeName_ = ""; |
| 1661 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1662 | /// For message and enum types, this is the name of the type. If the name |
| 1663 | /// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping |
| 1664 | /// rules are used to find the type (i.e. first the nested types within this |
| 1665 | /// message are searched, then within the parent, on up to the root |
| 1666 | /// namespace). |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1667 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1668 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1669 | public string TypeName { |
| 1670 | get { return typeName_; } |
| 1671 | set { |
| 1672 | typeName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1673 | } |
| 1674 | } |
| 1675 | |
| 1676 | /// <summary>Field number for the "extendee" field.</summary> |
| 1677 | public const int ExtendeeFieldNumber = 2; |
| 1678 | private string extendee_ = ""; |
| 1679 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1680 | /// For extensions, this is the name of the type being extended. It is |
| 1681 | /// resolved in the same manner as type_name. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1682 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1683 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1684 | public string Extendee { |
| 1685 | get { return extendee_; } |
| 1686 | set { |
| 1687 | extendee_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1688 | } |
| 1689 | } |
| 1690 | |
| 1691 | /// <summary>Field number for the "default_value" field.</summary> |
| 1692 | public const int DefaultValueFieldNumber = 7; |
| 1693 | private string defaultValue_ = ""; |
| 1694 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1695 | /// For numeric types, contains the original text representation of the value. |
| 1696 | /// For booleans, "true" or "false". |
| 1697 | /// For strings, contains the default text contents (not escaped in any way). |
| 1698 | /// For bytes, contains the C escaped value. All bytes >= 128 are escaped. |
| 1699 | /// TODO(kenton): Base-64 encode? |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1700 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1701 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1702 | public string DefaultValue { |
| 1703 | get { return defaultValue_; } |
| 1704 | set { |
| 1705 | defaultValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1706 | } |
| 1707 | } |
| 1708 | |
| 1709 | /// <summary>Field number for the "oneof_index" field.</summary> |
| 1710 | public const int OneofIndexFieldNumber = 9; |
| 1711 | private int oneofIndex_; |
| 1712 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1713 | /// If set, gives the index of a oneof in the containing type's oneof_decl |
| 1714 | /// list. This field is a member of that oneof. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1715 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1716 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1717 | public int OneofIndex { |
| 1718 | get { return oneofIndex_; } |
| 1719 | set { |
| 1720 | oneofIndex_ = value; |
| 1721 | } |
| 1722 | } |
| 1723 | |
| 1724 | /// <summary>Field number for the "json_name" field.</summary> |
| 1725 | public const int JsonNameFieldNumber = 10; |
| 1726 | private string jsonName_ = ""; |
| 1727 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1728 | /// JSON name of this field. The value is set by protocol compiler. If the |
| 1729 | /// user has set a "json_name" option on this field, that option's value |
| 1730 | /// will be used. Otherwise, it's deduced from the field's name by converting |
| 1731 | /// it to camelCase. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1732 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1733 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1734 | public string JsonName { |
| 1735 | get { return jsonName_; } |
| 1736 | set { |
| 1737 | jsonName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1738 | } |
| 1739 | } |
| 1740 | |
| 1741 | /// <summary>Field number for the "options" field.</summary> |
| 1742 | public const int OptionsFieldNumber = 8; |
| 1743 | private global::Google.Protobuf.Reflection.FieldOptions options_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1744 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1745 | public global::Google.Protobuf.Reflection.FieldOptions Options { |
| 1746 | get { return options_; } |
| 1747 | set { |
| 1748 | options_ = value; |
| 1749 | } |
| 1750 | } |
| 1751 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1752 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1753 | public override bool Equals(object other) { |
| 1754 | return Equals(other as FieldDescriptorProto); |
| 1755 | } |
| 1756 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1757 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1758 | public bool Equals(FieldDescriptorProto other) { |
| 1759 | if (ReferenceEquals(other, null)) { |
| 1760 | return false; |
| 1761 | } |
| 1762 | if (ReferenceEquals(other, this)) { |
| 1763 | return true; |
| 1764 | } |
| 1765 | if (Name != other.Name) return false; |
| 1766 | if (Number != other.Number) return false; |
| 1767 | if (Label != other.Label) return false; |
| 1768 | if (Type != other.Type) return false; |
| 1769 | if (TypeName != other.TypeName) return false; |
| 1770 | if (Extendee != other.Extendee) return false; |
| 1771 | if (DefaultValue != other.DefaultValue) return false; |
| 1772 | if (OneofIndex != other.OneofIndex) return false; |
| 1773 | if (JsonName != other.JsonName) return false; |
| 1774 | if (!object.Equals(Options, other.Options)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1775 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1776 | } |
| 1777 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1778 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1779 | public override int GetHashCode() { |
| 1780 | int hash = 1; |
| 1781 | if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 1782 | if (Number != 0) hash ^= Number.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1783 | if (Label != 0) hash ^= Label.GetHashCode(); |
| 1784 | if (Type != 0) hash ^= Type.GetHashCode(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1785 | if (TypeName.Length != 0) hash ^= TypeName.GetHashCode(); |
| 1786 | if (Extendee.Length != 0) hash ^= Extendee.GetHashCode(); |
| 1787 | if (DefaultValue.Length != 0) hash ^= DefaultValue.GetHashCode(); |
| 1788 | if (OneofIndex != 0) hash ^= OneofIndex.GetHashCode(); |
| 1789 | if (JsonName.Length != 0) hash ^= JsonName.GetHashCode(); |
| 1790 | if (options_ != null) hash ^= Options.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1791 | if (_unknownFields != null) { |
| 1792 | hash ^= _unknownFields.GetHashCode(); |
| 1793 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1794 | return hash; |
| 1795 | } |
| 1796 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1797 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1798 | public override string ToString() { |
| 1799 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 1800 | } |
| 1801 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1802 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1803 | public void WriteTo(pb::CodedOutputStream output) { |
| 1804 | if (Name.Length != 0) { |
| 1805 | output.WriteRawTag(10); |
| 1806 | output.WriteString(Name); |
| 1807 | } |
| 1808 | if (Extendee.Length != 0) { |
| 1809 | output.WriteRawTag(18); |
| 1810 | output.WriteString(Extendee); |
| 1811 | } |
| 1812 | if (Number != 0) { |
| 1813 | output.WriteRawTag(24); |
| 1814 | output.WriteInt32(Number); |
| 1815 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1816 | if (Label != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1817 | output.WriteRawTag(32); |
| 1818 | output.WriteEnum((int) Label); |
| 1819 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1820 | if (Type != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1821 | output.WriteRawTag(40); |
| 1822 | output.WriteEnum((int) Type); |
| 1823 | } |
| 1824 | if (TypeName.Length != 0) { |
| 1825 | output.WriteRawTag(50); |
| 1826 | output.WriteString(TypeName); |
| 1827 | } |
| 1828 | if (DefaultValue.Length != 0) { |
| 1829 | output.WriteRawTag(58); |
| 1830 | output.WriteString(DefaultValue); |
| 1831 | } |
| 1832 | if (options_ != null) { |
| 1833 | output.WriteRawTag(66); |
| 1834 | output.WriteMessage(Options); |
| 1835 | } |
| 1836 | if (OneofIndex != 0) { |
| 1837 | output.WriteRawTag(72); |
| 1838 | output.WriteInt32(OneofIndex); |
| 1839 | } |
| 1840 | if (JsonName.Length != 0) { |
| 1841 | output.WriteRawTag(82); |
| 1842 | output.WriteString(JsonName); |
| 1843 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1844 | if (_unknownFields != null) { |
| 1845 | _unknownFields.WriteTo(output); |
| 1846 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1847 | } |
| 1848 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1849 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1850 | public int CalculateSize() { |
| 1851 | int size = 0; |
| 1852 | if (Name.Length != 0) { |
| 1853 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 1854 | } |
| 1855 | if (Number != 0) { |
| 1856 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); |
| 1857 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1858 | if (Label != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1859 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Label); |
| 1860 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1861 | if (Type != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1862 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); |
| 1863 | } |
| 1864 | if (TypeName.Length != 0) { |
| 1865 | size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeName); |
| 1866 | } |
| 1867 | if (Extendee.Length != 0) { |
| 1868 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Extendee); |
| 1869 | } |
| 1870 | if (DefaultValue.Length != 0) { |
| 1871 | size += 1 + pb::CodedOutputStream.ComputeStringSize(DefaultValue); |
| 1872 | } |
| 1873 | if (OneofIndex != 0) { |
| 1874 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(OneofIndex); |
| 1875 | } |
| 1876 | if (JsonName.Length != 0) { |
| 1877 | size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonName); |
| 1878 | } |
| 1879 | if (options_ != null) { |
| 1880 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 1881 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1882 | if (_unknownFields != null) { |
| 1883 | size += _unknownFields.CalculateSize(); |
| 1884 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1885 | return size; |
| 1886 | } |
| 1887 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1888 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1889 | public void MergeFrom(FieldDescriptorProto other) { |
| 1890 | if (other == null) { |
| 1891 | return; |
| 1892 | } |
| 1893 | if (other.Name.Length != 0) { |
| 1894 | Name = other.Name; |
| 1895 | } |
| 1896 | if (other.Number != 0) { |
| 1897 | Number = other.Number; |
| 1898 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1899 | if (other.Label != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1900 | Label = other.Label; |
| 1901 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1902 | if (other.Type != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1903 | Type = other.Type; |
| 1904 | } |
| 1905 | if (other.TypeName.Length != 0) { |
| 1906 | TypeName = other.TypeName; |
| 1907 | } |
| 1908 | if (other.Extendee.Length != 0) { |
| 1909 | Extendee = other.Extendee; |
| 1910 | } |
| 1911 | if (other.DefaultValue.Length != 0) { |
| 1912 | DefaultValue = other.DefaultValue; |
| 1913 | } |
| 1914 | if (other.OneofIndex != 0) { |
| 1915 | OneofIndex = other.OneofIndex; |
| 1916 | } |
| 1917 | if (other.JsonName.Length != 0) { |
| 1918 | JsonName = other.JsonName; |
| 1919 | } |
| 1920 | if (other.options_ != null) { |
| 1921 | if (options_ == null) { |
| 1922 | options_ = new global::Google.Protobuf.Reflection.FieldOptions(); |
| 1923 | } |
| 1924 | Options.MergeFrom(other.Options); |
| 1925 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1926 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1927 | } |
| 1928 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1929 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1930 | public void MergeFrom(pb::CodedInputStream input) { |
| 1931 | uint tag; |
| 1932 | while ((tag = input.ReadTag()) != 0) { |
| 1933 | switch(tag) { |
| 1934 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1935 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1936 | break; |
| 1937 | case 10: { |
| 1938 | Name = input.ReadString(); |
| 1939 | break; |
| 1940 | } |
| 1941 | case 18: { |
| 1942 | Extendee = input.ReadString(); |
| 1943 | break; |
| 1944 | } |
| 1945 | case 24: { |
| 1946 | Number = input.ReadInt32(); |
| 1947 | break; |
| 1948 | } |
| 1949 | case 32: { |
| 1950 | label_ = (global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label) input.ReadEnum(); |
| 1951 | break; |
| 1952 | } |
| 1953 | case 40: { |
| 1954 | type_ = (global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type) input.ReadEnum(); |
| 1955 | break; |
| 1956 | } |
| 1957 | case 50: { |
| 1958 | TypeName = input.ReadString(); |
| 1959 | break; |
| 1960 | } |
| 1961 | case 58: { |
| 1962 | DefaultValue = input.ReadString(); |
| 1963 | break; |
| 1964 | } |
| 1965 | case 66: { |
| 1966 | if (options_ == null) { |
| 1967 | options_ = new global::Google.Protobuf.Reflection.FieldOptions(); |
| 1968 | } |
| 1969 | input.ReadMessage(options_); |
| 1970 | break; |
| 1971 | } |
| 1972 | case 72: { |
| 1973 | OneofIndex = input.ReadInt32(); |
| 1974 | break; |
| 1975 | } |
| 1976 | case 82: { |
| 1977 | JsonName = input.ReadString(); |
| 1978 | break; |
| 1979 | } |
| 1980 | } |
| 1981 | } |
| 1982 | } |
| 1983 | |
| 1984 | #region Nested types |
| 1985 | /// <summary>Container for nested types declared in the FieldDescriptorProto message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1986 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1987 | public static partial class Types { |
| 1988 | internal enum Type { |
| 1989 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1990 | /// 0 is reserved for errors. |
| 1991 | /// Order is weird for historical reasons. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1992 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1993 | [pbr::OriginalName("TYPE_DOUBLE")] Double = 1, |
| 1994 | [pbr::OriginalName("TYPE_FLOAT")] Float = 2, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1995 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1996 | /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if |
| 1997 | /// negative values are likely. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1998 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 1999 | [pbr::OriginalName("TYPE_INT64")] Int64 = 3, |
| 2000 | [pbr::OriginalName("TYPE_UINT64")] Uint64 = 4, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2001 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2002 | /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if |
| 2003 | /// negative values are likely. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2004 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2005 | [pbr::OriginalName("TYPE_INT32")] Int32 = 5, |
| 2006 | [pbr::OriginalName("TYPE_FIXED64")] Fixed64 = 6, |
| 2007 | [pbr::OriginalName("TYPE_FIXED32")] Fixed32 = 7, |
| 2008 | [pbr::OriginalName("TYPE_BOOL")] Bool = 8, |
| 2009 | [pbr::OriginalName("TYPE_STRING")] String = 9, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2010 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2011 | /// Tag-delimited aggregate. |
| 2012 | /// Group type is deprecated and not supported in proto3. However, Proto3 |
| 2013 | /// implementations should still be able to parse the group wire format and |
| 2014 | /// treat group fields as unknown fields. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2015 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2016 | [pbr::OriginalName("TYPE_GROUP")] Group = 10, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2017 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2018 | /// Length-delimited aggregate. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2019 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2020 | [pbr::OriginalName("TYPE_MESSAGE")] Message = 11, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2021 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2022 | /// New in version 2. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2023 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2024 | [pbr::OriginalName("TYPE_BYTES")] Bytes = 12, |
| 2025 | [pbr::OriginalName("TYPE_UINT32")] Uint32 = 13, |
| 2026 | [pbr::OriginalName("TYPE_ENUM")] Enum = 14, |
| 2027 | [pbr::OriginalName("TYPE_SFIXED32")] Sfixed32 = 15, |
| 2028 | [pbr::OriginalName("TYPE_SFIXED64")] Sfixed64 = 16, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2029 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2030 | /// Uses ZigZag encoding. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2031 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2032 | [pbr::OriginalName("TYPE_SINT32")] Sint32 = 17, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2033 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2034 | /// Uses ZigZag encoding. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2035 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2036 | [pbr::OriginalName("TYPE_SINT64")] Sint64 = 18, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2037 | } |
| 2038 | |
| 2039 | internal enum Label { |
| 2040 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2041 | /// 0 is reserved for errors |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2042 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2043 | [pbr::OriginalName("LABEL_OPTIONAL")] Optional = 1, |
| 2044 | [pbr::OriginalName("LABEL_REQUIRED")] Required = 2, |
| 2045 | [pbr::OriginalName("LABEL_REPEATED")] Repeated = 3, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2046 | } |
| 2047 | |
| 2048 | } |
| 2049 | #endregion |
| 2050 | |
| 2051 | } |
| 2052 | |
| 2053 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2054 | /// Describes a oneof. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2055 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2056 | internal sealed partial class OneofDescriptorProto : pb::IMessage<OneofDescriptorProto> { |
| 2057 | private static readonly pb::MessageParser<OneofDescriptorProto> _parser = new pb::MessageParser<OneofDescriptorProto>(() => new OneofDescriptorProto()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2058 | private pb::UnknownFieldSet _unknownFields; |
| 2059 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2060 | public static pb::MessageParser<OneofDescriptorProto> Parser { get { return _parser; } } |
| 2061 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2062 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2063 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2064 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[5]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2065 | } |
| 2066 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2067 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2068 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2069 | get { return Descriptor; } |
| 2070 | } |
| 2071 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2072 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2073 | public OneofDescriptorProto() { |
| 2074 | OnConstruction(); |
| 2075 | } |
| 2076 | |
| 2077 | partial void OnConstruction(); |
| 2078 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2079 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2080 | public OneofDescriptorProto(OneofDescriptorProto other) : this() { |
| 2081 | name_ = other.name_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2082 | options_ = other.options_ != null ? other.options_.Clone() : null; |
| 2083 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2084 | } |
| 2085 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2086 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2087 | public OneofDescriptorProto Clone() { |
| 2088 | return new OneofDescriptorProto(this); |
| 2089 | } |
| 2090 | |
| 2091 | /// <summary>Field number for the "name" field.</summary> |
| 2092 | public const int NameFieldNumber = 1; |
| 2093 | private string name_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2094 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2095 | public string Name { |
| 2096 | get { return name_; } |
| 2097 | set { |
| 2098 | name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 2099 | } |
| 2100 | } |
| 2101 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2102 | /// <summary>Field number for the "options" field.</summary> |
| 2103 | public const int OptionsFieldNumber = 2; |
| 2104 | private global::Google.Protobuf.Reflection.OneofOptions options_; |
| 2105 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2106 | public global::Google.Protobuf.Reflection.OneofOptions Options { |
| 2107 | get { return options_; } |
| 2108 | set { |
| 2109 | options_ = value; |
| 2110 | } |
| 2111 | } |
| 2112 | |
| 2113 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2114 | public override bool Equals(object other) { |
| 2115 | return Equals(other as OneofDescriptorProto); |
| 2116 | } |
| 2117 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2118 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2119 | public bool Equals(OneofDescriptorProto other) { |
| 2120 | if (ReferenceEquals(other, null)) { |
| 2121 | return false; |
| 2122 | } |
| 2123 | if (ReferenceEquals(other, this)) { |
| 2124 | return true; |
| 2125 | } |
| 2126 | if (Name != other.Name) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2127 | if (!object.Equals(Options, other.Options)) return false; |
| 2128 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2129 | } |
| 2130 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2131 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2132 | public override int GetHashCode() { |
| 2133 | int hash = 1; |
| 2134 | if (Name.Length != 0) hash ^= Name.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2135 | if (options_ != null) hash ^= Options.GetHashCode(); |
| 2136 | if (_unknownFields != null) { |
| 2137 | hash ^= _unknownFields.GetHashCode(); |
| 2138 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2139 | return hash; |
| 2140 | } |
| 2141 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2142 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2143 | public override string ToString() { |
| 2144 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2145 | } |
| 2146 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2147 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2148 | public void WriteTo(pb::CodedOutputStream output) { |
| 2149 | if (Name.Length != 0) { |
| 2150 | output.WriteRawTag(10); |
| 2151 | output.WriteString(Name); |
| 2152 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2153 | if (options_ != null) { |
| 2154 | output.WriteRawTag(18); |
| 2155 | output.WriteMessage(Options); |
| 2156 | } |
| 2157 | if (_unknownFields != null) { |
| 2158 | _unknownFields.WriteTo(output); |
| 2159 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2160 | } |
| 2161 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2162 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2163 | public int CalculateSize() { |
| 2164 | int size = 0; |
| 2165 | if (Name.Length != 0) { |
| 2166 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 2167 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2168 | if (options_ != null) { |
| 2169 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 2170 | } |
| 2171 | if (_unknownFields != null) { |
| 2172 | size += _unknownFields.CalculateSize(); |
| 2173 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2174 | return size; |
| 2175 | } |
| 2176 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2177 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2178 | public void MergeFrom(OneofDescriptorProto other) { |
| 2179 | if (other == null) { |
| 2180 | return; |
| 2181 | } |
| 2182 | if (other.Name.Length != 0) { |
| 2183 | Name = other.Name; |
| 2184 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2185 | if (other.options_ != null) { |
| 2186 | if (options_ == null) { |
| 2187 | options_ = new global::Google.Protobuf.Reflection.OneofOptions(); |
| 2188 | } |
| 2189 | Options.MergeFrom(other.Options); |
| 2190 | } |
| 2191 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2192 | } |
| 2193 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2194 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2195 | public void MergeFrom(pb::CodedInputStream input) { |
| 2196 | uint tag; |
| 2197 | while ((tag = input.ReadTag()) != 0) { |
| 2198 | switch(tag) { |
| 2199 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2200 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2201 | break; |
| 2202 | case 10: { |
| 2203 | Name = input.ReadString(); |
| 2204 | break; |
| 2205 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2206 | case 18: { |
| 2207 | if (options_ == null) { |
| 2208 | options_ = new global::Google.Protobuf.Reflection.OneofOptions(); |
| 2209 | } |
| 2210 | input.ReadMessage(options_); |
| 2211 | break; |
| 2212 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2213 | } |
| 2214 | } |
| 2215 | } |
| 2216 | |
| 2217 | } |
| 2218 | |
| 2219 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2220 | /// Describes an enum type. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2221 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2222 | internal sealed partial class EnumDescriptorProto : pb::IMessage<EnumDescriptorProto> { |
| 2223 | private static readonly pb::MessageParser<EnumDescriptorProto> _parser = new pb::MessageParser<EnumDescriptorProto>(() => new EnumDescriptorProto()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2224 | private pb::UnknownFieldSet _unknownFields; |
| 2225 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2226 | public static pb::MessageParser<EnumDescriptorProto> Parser { get { return _parser; } } |
| 2227 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2228 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2229 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2230 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[6]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2231 | } |
| 2232 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2233 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2234 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2235 | get { return Descriptor; } |
| 2236 | } |
| 2237 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2238 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2239 | public EnumDescriptorProto() { |
| 2240 | OnConstruction(); |
| 2241 | } |
| 2242 | |
| 2243 | partial void OnConstruction(); |
| 2244 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2245 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2246 | public EnumDescriptorProto(EnumDescriptorProto other) : this() { |
| 2247 | name_ = other.name_; |
| 2248 | value_ = other.value_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2249 | options_ = other.options_ != null ? other.options_.Clone() : null; |
| 2250 | reservedRange_ = other.reservedRange_.Clone(); |
| 2251 | reservedName_ = other.reservedName_.Clone(); |
| 2252 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2253 | } |
| 2254 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2255 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2256 | public EnumDescriptorProto Clone() { |
| 2257 | return new EnumDescriptorProto(this); |
| 2258 | } |
| 2259 | |
| 2260 | /// <summary>Field number for the "name" field.</summary> |
| 2261 | public const int NameFieldNumber = 1; |
| 2262 | private string name_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2263 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2264 | public string Name { |
| 2265 | get { return name_; } |
| 2266 | set { |
| 2267 | name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 2268 | } |
| 2269 | } |
| 2270 | |
| 2271 | /// <summary>Field number for the "value" field.</summary> |
| 2272 | public const int ValueFieldNumber = 2; |
| 2273 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.EnumValueDescriptorProto> _repeated_value_codec |
| 2274 | = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.EnumValueDescriptorProto.Parser); |
| 2275 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumValueDescriptorProto> value_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumValueDescriptorProto>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2276 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2277 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumValueDescriptorProto> Value { |
| 2278 | get { return value_; } |
| 2279 | } |
| 2280 | |
| 2281 | /// <summary>Field number for the "options" field.</summary> |
| 2282 | public const int OptionsFieldNumber = 3; |
| 2283 | private global::Google.Protobuf.Reflection.EnumOptions options_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2284 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2285 | public global::Google.Protobuf.Reflection.EnumOptions Options { |
| 2286 | get { return options_; } |
| 2287 | set { |
| 2288 | options_ = value; |
| 2289 | } |
| 2290 | } |
| 2291 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2292 | /// <summary>Field number for the "reserved_range" field.</summary> |
| 2293 | public const int ReservedRangeFieldNumber = 4; |
| 2294 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.EnumDescriptorProto.Types.EnumReservedRange> _repeated_reservedRange_codec |
| 2295 | = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.EnumDescriptorProto.Types.EnumReservedRange.Parser); |
| 2296 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumDescriptorProto.Types.EnumReservedRange> reservedRange_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumDescriptorProto.Types.EnumReservedRange>(); |
| 2297 | /// <summary> |
| 2298 | /// Range of reserved numeric values. Reserved numeric values may not be used |
| 2299 | /// by enum values in the same enum declaration. Reserved ranges may not |
| 2300 | /// overlap. |
| 2301 | /// </summary> |
| 2302 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2303 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumDescriptorProto.Types.EnumReservedRange> ReservedRange { |
| 2304 | get { return reservedRange_; } |
| 2305 | } |
| 2306 | |
| 2307 | /// <summary>Field number for the "reserved_name" field.</summary> |
| 2308 | public const int ReservedNameFieldNumber = 5; |
| 2309 | private static readonly pb::FieldCodec<string> _repeated_reservedName_codec |
| 2310 | = pb::FieldCodec.ForString(42); |
| 2311 | private readonly pbc::RepeatedField<string> reservedName_ = new pbc::RepeatedField<string>(); |
| 2312 | /// <summary> |
| 2313 | /// Reserved enum value names, which may not be reused. A given name may only |
| 2314 | /// be reserved once. |
| 2315 | /// </summary> |
| 2316 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2317 | public pbc::RepeatedField<string> ReservedName { |
| 2318 | get { return reservedName_; } |
| 2319 | } |
| 2320 | |
| 2321 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2322 | public override bool Equals(object other) { |
| 2323 | return Equals(other as EnumDescriptorProto); |
| 2324 | } |
| 2325 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2326 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2327 | public bool Equals(EnumDescriptorProto other) { |
| 2328 | if (ReferenceEquals(other, null)) { |
| 2329 | return false; |
| 2330 | } |
| 2331 | if (ReferenceEquals(other, this)) { |
| 2332 | return true; |
| 2333 | } |
| 2334 | if (Name != other.Name) return false; |
| 2335 | if(!value_.Equals(other.value_)) return false; |
| 2336 | if (!object.Equals(Options, other.Options)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2337 | if(!reservedRange_.Equals(other.reservedRange_)) return false; |
| 2338 | if(!reservedName_.Equals(other.reservedName_)) return false; |
| 2339 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2340 | } |
| 2341 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2342 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2343 | public override int GetHashCode() { |
| 2344 | int hash = 1; |
| 2345 | if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 2346 | hash ^= value_.GetHashCode(); |
| 2347 | if (options_ != null) hash ^= Options.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2348 | hash ^= reservedRange_.GetHashCode(); |
| 2349 | hash ^= reservedName_.GetHashCode(); |
| 2350 | if (_unknownFields != null) { |
| 2351 | hash ^= _unknownFields.GetHashCode(); |
| 2352 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2353 | return hash; |
| 2354 | } |
| 2355 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2356 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2357 | public override string ToString() { |
| 2358 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2359 | } |
| 2360 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2361 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2362 | public void WriteTo(pb::CodedOutputStream output) { |
| 2363 | if (Name.Length != 0) { |
| 2364 | output.WriteRawTag(10); |
| 2365 | output.WriteString(Name); |
| 2366 | } |
| 2367 | value_.WriteTo(output, _repeated_value_codec); |
| 2368 | if (options_ != null) { |
| 2369 | output.WriteRawTag(26); |
| 2370 | output.WriteMessage(Options); |
| 2371 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2372 | reservedRange_.WriteTo(output, _repeated_reservedRange_codec); |
| 2373 | reservedName_.WriteTo(output, _repeated_reservedName_codec); |
| 2374 | if (_unknownFields != null) { |
| 2375 | _unknownFields.WriteTo(output); |
| 2376 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2377 | } |
| 2378 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2379 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2380 | public int CalculateSize() { |
| 2381 | int size = 0; |
| 2382 | if (Name.Length != 0) { |
| 2383 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 2384 | } |
| 2385 | size += value_.CalculateSize(_repeated_value_codec); |
| 2386 | if (options_ != null) { |
| 2387 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 2388 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2389 | size += reservedRange_.CalculateSize(_repeated_reservedRange_codec); |
| 2390 | size += reservedName_.CalculateSize(_repeated_reservedName_codec); |
| 2391 | if (_unknownFields != null) { |
| 2392 | size += _unknownFields.CalculateSize(); |
| 2393 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2394 | return size; |
| 2395 | } |
| 2396 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2397 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2398 | public void MergeFrom(EnumDescriptorProto other) { |
| 2399 | if (other == null) { |
| 2400 | return; |
| 2401 | } |
| 2402 | if (other.Name.Length != 0) { |
| 2403 | Name = other.Name; |
| 2404 | } |
| 2405 | value_.Add(other.value_); |
| 2406 | if (other.options_ != null) { |
| 2407 | if (options_ == null) { |
| 2408 | options_ = new global::Google.Protobuf.Reflection.EnumOptions(); |
| 2409 | } |
| 2410 | Options.MergeFrom(other.Options); |
| 2411 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2412 | reservedRange_.Add(other.reservedRange_); |
| 2413 | reservedName_.Add(other.reservedName_); |
| 2414 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2415 | } |
| 2416 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2417 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2418 | public void MergeFrom(pb::CodedInputStream input) { |
| 2419 | uint tag; |
| 2420 | while ((tag = input.ReadTag()) != 0) { |
| 2421 | switch(tag) { |
| 2422 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2423 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2424 | break; |
| 2425 | case 10: { |
| 2426 | Name = input.ReadString(); |
| 2427 | break; |
| 2428 | } |
| 2429 | case 18: { |
| 2430 | value_.AddEntriesFrom(input, _repeated_value_codec); |
| 2431 | break; |
| 2432 | } |
| 2433 | case 26: { |
| 2434 | if (options_ == null) { |
| 2435 | options_ = new global::Google.Protobuf.Reflection.EnumOptions(); |
| 2436 | } |
| 2437 | input.ReadMessage(options_); |
| 2438 | break; |
| 2439 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2440 | case 34: { |
| 2441 | reservedRange_.AddEntriesFrom(input, _repeated_reservedRange_codec); |
| 2442 | break; |
| 2443 | } |
| 2444 | case 42: { |
| 2445 | reservedName_.AddEntriesFrom(input, _repeated_reservedName_codec); |
| 2446 | break; |
| 2447 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2448 | } |
| 2449 | } |
| 2450 | } |
| 2451 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2452 | #region Nested types |
| 2453 | /// <summary>Container for nested types declared in the EnumDescriptorProto message type.</summary> |
| 2454 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2455 | public static partial class Types { |
| 2456 | /// <summary> |
| 2457 | /// Range of reserved numeric values. Reserved values may not be used by |
| 2458 | /// entries in the same enum. Reserved ranges may not overlap. |
| 2459 | /// |
| 2460 | /// Note that this is distinct from DescriptorProto.ReservedRange in that it |
| 2461 | /// is inclusive such that it can appropriately represent the entire int32 |
| 2462 | /// domain. |
| 2463 | /// </summary> |
| 2464 | internal sealed partial class EnumReservedRange : pb::IMessage<EnumReservedRange> { |
| 2465 | private static readonly pb::MessageParser<EnumReservedRange> _parser = new pb::MessageParser<EnumReservedRange>(() => new EnumReservedRange()); |
| 2466 | private pb::UnknownFieldSet _unknownFields; |
| 2467 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2468 | public static pb::MessageParser<EnumReservedRange> Parser { get { return _parser; } } |
| 2469 | |
| 2470 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2471 | public static pbr::MessageDescriptor Descriptor { |
| 2472 | get { return global::Google.Protobuf.Reflection.EnumDescriptorProto.Descriptor.NestedTypes[0]; } |
| 2473 | } |
| 2474 | |
| 2475 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2476 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2477 | get { return Descriptor; } |
| 2478 | } |
| 2479 | |
| 2480 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2481 | public EnumReservedRange() { |
| 2482 | OnConstruction(); |
| 2483 | } |
| 2484 | |
| 2485 | partial void OnConstruction(); |
| 2486 | |
| 2487 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2488 | public EnumReservedRange(EnumReservedRange other) : this() { |
| 2489 | start_ = other.start_; |
| 2490 | end_ = other.end_; |
| 2491 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
| 2492 | } |
| 2493 | |
| 2494 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2495 | public EnumReservedRange Clone() { |
| 2496 | return new EnumReservedRange(this); |
| 2497 | } |
| 2498 | |
| 2499 | /// <summary>Field number for the "start" field.</summary> |
| 2500 | public const int StartFieldNumber = 1; |
| 2501 | private int start_; |
| 2502 | /// <summary> |
| 2503 | /// Inclusive. |
| 2504 | /// </summary> |
| 2505 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2506 | public int Start { |
| 2507 | get { return start_; } |
| 2508 | set { |
| 2509 | start_ = value; |
| 2510 | } |
| 2511 | } |
| 2512 | |
| 2513 | /// <summary>Field number for the "end" field.</summary> |
| 2514 | public const int EndFieldNumber = 2; |
| 2515 | private int end_; |
| 2516 | /// <summary> |
| 2517 | /// Inclusive. |
| 2518 | /// </summary> |
| 2519 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2520 | public int End { |
| 2521 | get { return end_; } |
| 2522 | set { |
| 2523 | end_ = value; |
| 2524 | } |
| 2525 | } |
| 2526 | |
| 2527 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2528 | public override bool Equals(object other) { |
| 2529 | return Equals(other as EnumReservedRange); |
| 2530 | } |
| 2531 | |
| 2532 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2533 | public bool Equals(EnumReservedRange other) { |
| 2534 | if (ReferenceEquals(other, null)) { |
| 2535 | return false; |
| 2536 | } |
| 2537 | if (ReferenceEquals(other, this)) { |
| 2538 | return true; |
| 2539 | } |
| 2540 | if (Start != other.Start) return false; |
| 2541 | if (End != other.End) return false; |
| 2542 | return Equals(_unknownFields, other._unknownFields); |
| 2543 | } |
| 2544 | |
| 2545 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2546 | public override int GetHashCode() { |
| 2547 | int hash = 1; |
| 2548 | if (Start != 0) hash ^= Start.GetHashCode(); |
| 2549 | if (End != 0) hash ^= End.GetHashCode(); |
| 2550 | if (_unknownFields != null) { |
| 2551 | hash ^= _unknownFields.GetHashCode(); |
| 2552 | } |
| 2553 | return hash; |
| 2554 | } |
| 2555 | |
| 2556 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2557 | public override string ToString() { |
| 2558 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2559 | } |
| 2560 | |
| 2561 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2562 | public void WriteTo(pb::CodedOutputStream output) { |
| 2563 | if (Start != 0) { |
| 2564 | output.WriteRawTag(8); |
| 2565 | output.WriteInt32(Start); |
| 2566 | } |
| 2567 | if (End != 0) { |
| 2568 | output.WriteRawTag(16); |
| 2569 | output.WriteInt32(End); |
| 2570 | } |
| 2571 | if (_unknownFields != null) { |
| 2572 | _unknownFields.WriteTo(output); |
| 2573 | } |
| 2574 | } |
| 2575 | |
| 2576 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2577 | public int CalculateSize() { |
| 2578 | int size = 0; |
| 2579 | if (Start != 0) { |
| 2580 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Start); |
| 2581 | } |
| 2582 | if (End != 0) { |
| 2583 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(End); |
| 2584 | } |
| 2585 | if (_unknownFields != null) { |
| 2586 | size += _unknownFields.CalculateSize(); |
| 2587 | } |
| 2588 | return size; |
| 2589 | } |
| 2590 | |
| 2591 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2592 | public void MergeFrom(EnumReservedRange other) { |
| 2593 | if (other == null) { |
| 2594 | return; |
| 2595 | } |
| 2596 | if (other.Start != 0) { |
| 2597 | Start = other.Start; |
| 2598 | } |
| 2599 | if (other.End != 0) { |
| 2600 | End = other.End; |
| 2601 | } |
| 2602 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
| 2603 | } |
| 2604 | |
| 2605 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 2606 | public void MergeFrom(pb::CodedInputStream input) { |
| 2607 | uint tag; |
| 2608 | while ((tag = input.ReadTag()) != 0) { |
| 2609 | switch(tag) { |
| 2610 | default: |
| 2611 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
| 2612 | break; |
| 2613 | case 8: { |
| 2614 | Start = input.ReadInt32(); |
| 2615 | break; |
| 2616 | } |
| 2617 | case 16: { |
| 2618 | End = input.ReadInt32(); |
| 2619 | break; |
| 2620 | } |
| 2621 | } |
| 2622 | } |
| 2623 | } |
| 2624 | |
| 2625 | } |
| 2626 | |
| 2627 | } |
| 2628 | #endregion |
| 2629 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2630 | } |
| 2631 | |
| 2632 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2633 | /// Describes a value within an enum. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2634 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2635 | internal sealed partial class EnumValueDescriptorProto : pb::IMessage<EnumValueDescriptorProto> { |
| 2636 | private static readonly pb::MessageParser<EnumValueDescriptorProto> _parser = new pb::MessageParser<EnumValueDescriptorProto>(() => new EnumValueDescriptorProto()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2637 | private pb::UnknownFieldSet _unknownFields; |
| 2638 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2639 | public static pb::MessageParser<EnumValueDescriptorProto> Parser { get { return _parser; } } |
| 2640 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2641 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2642 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2643 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[7]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2644 | } |
| 2645 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2646 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2647 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2648 | get { return Descriptor; } |
| 2649 | } |
| 2650 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2651 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2652 | public EnumValueDescriptorProto() { |
| 2653 | OnConstruction(); |
| 2654 | } |
| 2655 | |
| 2656 | partial void OnConstruction(); |
| 2657 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2658 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2659 | public EnumValueDescriptorProto(EnumValueDescriptorProto other) : this() { |
| 2660 | name_ = other.name_; |
| 2661 | number_ = other.number_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2662 | options_ = other.options_ != null ? other.options_.Clone() : null; |
| 2663 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2664 | } |
| 2665 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2666 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2667 | public EnumValueDescriptorProto Clone() { |
| 2668 | return new EnumValueDescriptorProto(this); |
| 2669 | } |
| 2670 | |
| 2671 | /// <summary>Field number for the "name" field.</summary> |
| 2672 | public const int NameFieldNumber = 1; |
| 2673 | private string name_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2674 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2675 | public string Name { |
| 2676 | get { return name_; } |
| 2677 | set { |
| 2678 | name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 2679 | } |
| 2680 | } |
| 2681 | |
| 2682 | /// <summary>Field number for the "number" field.</summary> |
| 2683 | public const int NumberFieldNumber = 2; |
| 2684 | private int number_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2685 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2686 | public int Number { |
| 2687 | get { return number_; } |
| 2688 | set { |
| 2689 | number_ = value; |
| 2690 | } |
| 2691 | } |
| 2692 | |
| 2693 | /// <summary>Field number for the "options" field.</summary> |
| 2694 | public const int OptionsFieldNumber = 3; |
| 2695 | private global::Google.Protobuf.Reflection.EnumValueOptions options_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2696 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2697 | public global::Google.Protobuf.Reflection.EnumValueOptions Options { |
| 2698 | get { return options_; } |
| 2699 | set { |
| 2700 | options_ = value; |
| 2701 | } |
| 2702 | } |
| 2703 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2704 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2705 | public override bool Equals(object other) { |
| 2706 | return Equals(other as EnumValueDescriptorProto); |
| 2707 | } |
| 2708 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2709 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2710 | public bool Equals(EnumValueDescriptorProto other) { |
| 2711 | if (ReferenceEquals(other, null)) { |
| 2712 | return false; |
| 2713 | } |
| 2714 | if (ReferenceEquals(other, this)) { |
| 2715 | return true; |
| 2716 | } |
| 2717 | if (Name != other.Name) return false; |
| 2718 | if (Number != other.Number) return false; |
| 2719 | if (!object.Equals(Options, other.Options)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2720 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2721 | } |
| 2722 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2723 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2724 | public override int GetHashCode() { |
| 2725 | int hash = 1; |
| 2726 | if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 2727 | if (Number != 0) hash ^= Number.GetHashCode(); |
| 2728 | if (options_ != null) hash ^= Options.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2729 | if (_unknownFields != null) { |
| 2730 | hash ^= _unknownFields.GetHashCode(); |
| 2731 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2732 | return hash; |
| 2733 | } |
| 2734 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2735 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2736 | public override string ToString() { |
| 2737 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2738 | } |
| 2739 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2740 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2741 | public void WriteTo(pb::CodedOutputStream output) { |
| 2742 | if (Name.Length != 0) { |
| 2743 | output.WriteRawTag(10); |
| 2744 | output.WriteString(Name); |
| 2745 | } |
| 2746 | if (Number != 0) { |
| 2747 | output.WriteRawTag(16); |
| 2748 | output.WriteInt32(Number); |
| 2749 | } |
| 2750 | if (options_ != null) { |
| 2751 | output.WriteRawTag(26); |
| 2752 | output.WriteMessage(Options); |
| 2753 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2754 | if (_unknownFields != null) { |
| 2755 | _unknownFields.WriteTo(output); |
| 2756 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2757 | } |
| 2758 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2759 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2760 | public int CalculateSize() { |
| 2761 | int size = 0; |
| 2762 | if (Name.Length != 0) { |
| 2763 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 2764 | } |
| 2765 | if (Number != 0) { |
| 2766 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); |
| 2767 | } |
| 2768 | if (options_ != null) { |
| 2769 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 2770 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2771 | if (_unknownFields != null) { |
| 2772 | size += _unknownFields.CalculateSize(); |
| 2773 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2774 | return size; |
| 2775 | } |
| 2776 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2777 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2778 | public void MergeFrom(EnumValueDescriptorProto other) { |
| 2779 | if (other == null) { |
| 2780 | return; |
| 2781 | } |
| 2782 | if (other.Name.Length != 0) { |
| 2783 | Name = other.Name; |
| 2784 | } |
| 2785 | if (other.Number != 0) { |
| 2786 | Number = other.Number; |
| 2787 | } |
| 2788 | if (other.options_ != null) { |
| 2789 | if (options_ == null) { |
| 2790 | options_ = new global::Google.Protobuf.Reflection.EnumValueOptions(); |
| 2791 | } |
| 2792 | Options.MergeFrom(other.Options); |
| 2793 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2794 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2795 | } |
| 2796 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2797 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2798 | public void MergeFrom(pb::CodedInputStream input) { |
| 2799 | uint tag; |
| 2800 | while ((tag = input.ReadTag()) != 0) { |
| 2801 | switch(tag) { |
| 2802 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2803 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2804 | break; |
| 2805 | case 10: { |
| 2806 | Name = input.ReadString(); |
| 2807 | break; |
| 2808 | } |
| 2809 | case 16: { |
| 2810 | Number = input.ReadInt32(); |
| 2811 | break; |
| 2812 | } |
| 2813 | case 26: { |
| 2814 | if (options_ == null) { |
| 2815 | options_ = new global::Google.Protobuf.Reflection.EnumValueOptions(); |
| 2816 | } |
| 2817 | input.ReadMessage(options_); |
| 2818 | break; |
| 2819 | } |
| 2820 | } |
| 2821 | } |
| 2822 | } |
| 2823 | |
| 2824 | } |
| 2825 | |
| 2826 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2827 | /// Describes a service. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2828 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2829 | internal sealed partial class ServiceDescriptorProto : pb::IMessage<ServiceDescriptorProto> { |
| 2830 | private static readonly pb::MessageParser<ServiceDescriptorProto> _parser = new pb::MessageParser<ServiceDescriptorProto>(() => new ServiceDescriptorProto()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2831 | private pb::UnknownFieldSet _unknownFields; |
| 2832 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2833 | public static pb::MessageParser<ServiceDescriptorProto> Parser { get { return _parser; } } |
| 2834 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2835 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2836 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2837 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[8]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2838 | } |
| 2839 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2840 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2841 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2842 | get { return Descriptor; } |
| 2843 | } |
| 2844 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2845 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2846 | public ServiceDescriptorProto() { |
| 2847 | OnConstruction(); |
| 2848 | } |
| 2849 | |
| 2850 | partial void OnConstruction(); |
| 2851 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2852 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2853 | public ServiceDescriptorProto(ServiceDescriptorProto other) : this() { |
| 2854 | name_ = other.name_; |
| 2855 | method_ = other.method_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2856 | options_ = other.options_ != null ? other.options_.Clone() : null; |
| 2857 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2858 | } |
| 2859 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2860 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2861 | public ServiceDescriptorProto Clone() { |
| 2862 | return new ServiceDescriptorProto(this); |
| 2863 | } |
| 2864 | |
| 2865 | /// <summary>Field number for the "name" field.</summary> |
| 2866 | public const int NameFieldNumber = 1; |
| 2867 | private string name_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2868 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2869 | public string Name { |
| 2870 | get { return name_; } |
| 2871 | set { |
| 2872 | name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 2873 | } |
| 2874 | } |
| 2875 | |
| 2876 | /// <summary>Field number for the "method" field.</summary> |
| 2877 | public const int MethodFieldNumber = 2; |
| 2878 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.MethodDescriptorProto> _repeated_method_codec |
| 2879 | = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.MethodDescriptorProto.Parser); |
| 2880 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.MethodDescriptorProto> method_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.MethodDescriptorProto>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2881 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2882 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.MethodDescriptorProto> Method { |
| 2883 | get { return method_; } |
| 2884 | } |
| 2885 | |
| 2886 | /// <summary>Field number for the "options" field.</summary> |
| 2887 | public const int OptionsFieldNumber = 3; |
| 2888 | private global::Google.Protobuf.Reflection.ServiceOptions options_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2889 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2890 | public global::Google.Protobuf.Reflection.ServiceOptions Options { |
| 2891 | get { return options_; } |
| 2892 | set { |
| 2893 | options_ = value; |
| 2894 | } |
| 2895 | } |
| 2896 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2897 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2898 | public override bool Equals(object other) { |
| 2899 | return Equals(other as ServiceDescriptorProto); |
| 2900 | } |
| 2901 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2902 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2903 | public bool Equals(ServiceDescriptorProto other) { |
| 2904 | if (ReferenceEquals(other, null)) { |
| 2905 | return false; |
| 2906 | } |
| 2907 | if (ReferenceEquals(other, this)) { |
| 2908 | return true; |
| 2909 | } |
| 2910 | if (Name != other.Name) return false; |
| 2911 | if(!method_.Equals(other.method_)) return false; |
| 2912 | if (!object.Equals(Options, other.Options)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2913 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2914 | } |
| 2915 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2916 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2917 | public override int GetHashCode() { |
| 2918 | int hash = 1; |
| 2919 | if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 2920 | hash ^= method_.GetHashCode(); |
| 2921 | if (options_ != null) hash ^= Options.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2922 | if (_unknownFields != null) { |
| 2923 | hash ^= _unknownFields.GetHashCode(); |
| 2924 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2925 | return hash; |
| 2926 | } |
| 2927 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2928 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2929 | public override string ToString() { |
| 2930 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 2931 | } |
| 2932 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2933 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2934 | public void WriteTo(pb::CodedOutputStream output) { |
| 2935 | if (Name.Length != 0) { |
| 2936 | output.WriteRawTag(10); |
| 2937 | output.WriteString(Name); |
| 2938 | } |
| 2939 | method_.WriteTo(output, _repeated_method_codec); |
| 2940 | if (options_ != null) { |
| 2941 | output.WriteRawTag(26); |
| 2942 | output.WriteMessage(Options); |
| 2943 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2944 | if (_unknownFields != null) { |
| 2945 | _unknownFields.WriteTo(output); |
| 2946 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2947 | } |
| 2948 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2949 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2950 | public int CalculateSize() { |
| 2951 | int size = 0; |
| 2952 | if (Name.Length != 0) { |
| 2953 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 2954 | } |
| 2955 | size += method_.CalculateSize(_repeated_method_codec); |
| 2956 | if (options_ != null) { |
| 2957 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 2958 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2959 | if (_unknownFields != null) { |
| 2960 | size += _unknownFields.CalculateSize(); |
| 2961 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2962 | return size; |
| 2963 | } |
| 2964 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2965 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2966 | public void MergeFrom(ServiceDescriptorProto other) { |
| 2967 | if (other == null) { |
| 2968 | return; |
| 2969 | } |
| 2970 | if (other.Name.Length != 0) { |
| 2971 | Name = other.Name; |
| 2972 | } |
| 2973 | method_.Add(other.method_); |
| 2974 | if (other.options_ != null) { |
| 2975 | if (options_ == null) { |
| 2976 | options_ = new global::Google.Protobuf.Reflection.ServiceOptions(); |
| 2977 | } |
| 2978 | Options.MergeFrom(other.Options); |
| 2979 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2980 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2981 | } |
| 2982 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2983 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2984 | public void MergeFrom(pb::CodedInputStream input) { |
| 2985 | uint tag; |
| 2986 | while ((tag = input.ReadTag()) != 0) { |
| 2987 | switch(tag) { |
| 2988 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 2989 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 2990 | break; |
| 2991 | case 10: { |
| 2992 | Name = input.ReadString(); |
| 2993 | break; |
| 2994 | } |
| 2995 | case 18: { |
| 2996 | method_.AddEntriesFrom(input, _repeated_method_codec); |
| 2997 | break; |
| 2998 | } |
| 2999 | case 26: { |
| 3000 | if (options_ == null) { |
| 3001 | options_ = new global::Google.Protobuf.Reflection.ServiceOptions(); |
| 3002 | } |
| 3003 | input.ReadMessage(options_); |
| 3004 | break; |
| 3005 | } |
| 3006 | } |
| 3007 | } |
| 3008 | } |
| 3009 | |
| 3010 | } |
| 3011 | |
| 3012 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3013 | /// Describes a method of a service. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3014 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3015 | internal sealed partial class MethodDescriptorProto : pb::IMessage<MethodDescriptorProto> { |
| 3016 | private static readonly pb::MessageParser<MethodDescriptorProto> _parser = new pb::MessageParser<MethodDescriptorProto>(() => new MethodDescriptorProto()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3017 | private pb::UnknownFieldSet _unknownFields; |
| 3018 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3019 | public static pb::MessageParser<MethodDescriptorProto> Parser { get { return _parser; } } |
| 3020 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3021 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3022 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3023 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[9]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3024 | } |
| 3025 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3026 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3027 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3028 | get { return Descriptor; } |
| 3029 | } |
| 3030 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3031 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3032 | public MethodDescriptorProto() { |
| 3033 | OnConstruction(); |
| 3034 | } |
| 3035 | |
| 3036 | partial void OnConstruction(); |
| 3037 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3038 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3039 | public MethodDescriptorProto(MethodDescriptorProto other) : this() { |
| 3040 | name_ = other.name_; |
| 3041 | inputType_ = other.inputType_; |
| 3042 | outputType_ = other.outputType_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3043 | options_ = other.options_ != null ? other.options_.Clone() : null; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3044 | clientStreaming_ = other.clientStreaming_; |
| 3045 | serverStreaming_ = other.serverStreaming_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3046 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3047 | } |
| 3048 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3049 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3050 | public MethodDescriptorProto Clone() { |
| 3051 | return new MethodDescriptorProto(this); |
| 3052 | } |
| 3053 | |
| 3054 | /// <summary>Field number for the "name" field.</summary> |
| 3055 | public const int NameFieldNumber = 1; |
| 3056 | private string name_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3057 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3058 | public string Name { |
| 3059 | get { return name_; } |
| 3060 | set { |
| 3061 | name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3062 | } |
| 3063 | } |
| 3064 | |
| 3065 | /// <summary>Field number for the "input_type" field.</summary> |
| 3066 | public const int InputTypeFieldNumber = 2; |
| 3067 | private string inputType_ = ""; |
| 3068 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3069 | /// Input and output type names. These are resolved in the same way as |
| 3070 | /// FieldDescriptorProto.type_name, but must refer to a message type. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3071 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3072 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3073 | public string InputType { |
| 3074 | get { return inputType_; } |
| 3075 | set { |
| 3076 | inputType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3077 | } |
| 3078 | } |
| 3079 | |
| 3080 | /// <summary>Field number for the "output_type" field.</summary> |
| 3081 | public const int OutputTypeFieldNumber = 3; |
| 3082 | private string outputType_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3083 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3084 | public string OutputType { |
| 3085 | get { return outputType_; } |
| 3086 | set { |
| 3087 | outputType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3088 | } |
| 3089 | } |
| 3090 | |
| 3091 | /// <summary>Field number for the "options" field.</summary> |
| 3092 | public const int OptionsFieldNumber = 4; |
| 3093 | private global::Google.Protobuf.Reflection.MethodOptions options_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3094 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3095 | public global::Google.Protobuf.Reflection.MethodOptions Options { |
| 3096 | get { return options_; } |
| 3097 | set { |
| 3098 | options_ = value; |
| 3099 | } |
| 3100 | } |
| 3101 | |
| 3102 | /// <summary>Field number for the "client_streaming" field.</summary> |
| 3103 | public const int ClientStreamingFieldNumber = 5; |
| 3104 | private bool clientStreaming_; |
| 3105 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3106 | /// Identifies if client streams multiple client messages |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3107 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3108 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3109 | public bool ClientStreaming { |
| 3110 | get { return clientStreaming_; } |
| 3111 | set { |
| 3112 | clientStreaming_ = value; |
| 3113 | } |
| 3114 | } |
| 3115 | |
| 3116 | /// <summary>Field number for the "server_streaming" field.</summary> |
| 3117 | public const int ServerStreamingFieldNumber = 6; |
| 3118 | private bool serverStreaming_; |
| 3119 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3120 | /// Identifies if server streams multiple server messages |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3121 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3122 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3123 | public bool ServerStreaming { |
| 3124 | get { return serverStreaming_; } |
| 3125 | set { |
| 3126 | serverStreaming_ = value; |
| 3127 | } |
| 3128 | } |
| 3129 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3130 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3131 | public override bool Equals(object other) { |
| 3132 | return Equals(other as MethodDescriptorProto); |
| 3133 | } |
| 3134 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3135 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3136 | public bool Equals(MethodDescriptorProto other) { |
| 3137 | if (ReferenceEquals(other, null)) { |
| 3138 | return false; |
| 3139 | } |
| 3140 | if (ReferenceEquals(other, this)) { |
| 3141 | return true; |
| 3142 | } |
| 3143 | if (Name != other.Name) return false; |
| 3144 | if (InputType != other.InputType) return false; |
| 3145 | if (OutputType != other.OutputType) return false; |
| 3146 | if (!object.Equals(Options, other.Options)) return false; |
| 3147 | if (ClientStreaming != other.ClientStreaming) return false; |
| 3148 | if (ServerStreaming != other.ServerStreaming) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3149 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3150 | } |
| 3151 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3152 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3153 | public override int GetHashCode() { |
| 3154 | int hash = 1; |
| 3155 | if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 3156 | if (InputType.Length != 0) hash ^= InputType.GetHashCode(); |
| 3157 | if (OutputType.Length != 0) hash ^= OutputType.GetHashCode(); |
| 3158 | if (options_ != null) hash ^= Options.GetHashCode(); |
| 3159 | if (ClientStreaming != false) hash ^= ClientStreaming.GetHashCode(); |
| 3160 | if (ServerStreaming != false) hash ^= ServerStreaming.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3161 | if (_unknownFields != null) { |
| 3162 | hash ^= _unknownFields.GetHashCode(); |
| 3163 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3164 | return hash; |
| 3165 | } |
| 3166 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3167 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3168 | public override string ToString() { |
| 3169 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 3170 | } |
| 3171 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3172 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3173 | public void WriteTo(pb::CodedOutputStream output) { |
| 3174 | if (Name.Length != 0) { |
| 3175 | output.WriteRawTag(10); |
| 3176 | output.WriteString(Name); |
| 3177 | } |
| 3178 | if (InputType.Length != 0) { |
| 3179 | output.WriteRawTag(18); |
| 3180 | output.WriteString(InputType); |
| 3181 | } |
| 3182 | if (OutputType.Length != 0) { |
| 3183 | output.WriteRawTag(26); |
| 3184 | output.WriteString(OutputType); |
| 3185 | } |
| 3186 | if (options_ != null) { |
| 3187 | output.WriteRawTag(34); |
| 3188 | output.WriteMessage(Options); |
| 3189 | } |
| 3190 | if (ClientStreaming != false) { |
| 3191 | output.WriteRawTag(40); |
| 3192 | output.WriteBool(ClientStreaming); |
| 3193 | } |
| 3194 | if (ServerStreaming != false) { |
| 3195 | output.WriteRawTag(48); |
| 3196 | output.WriteBool(ServerStreaming); |
| 3197 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3198 | if (_unknownFields != null) { |
| 3199 | _unknownFields.WriteTo(output); |
| 3200 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3201 | } |
| 3202 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3203 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3204 | public int CalculateSize() { |
| 3205 | int size = 0; |
| 3206 | if (Name.Length != 0) { |
| 3207 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 3208 | } |
| 3209 | if (InputType.Length != 0) { |
| 3210 | size += 1 + pb::CodedOutputStream.ComputeStringSize(InputType); |
| 3211 | } |
| 3212 | if (OutputType.Length != 0) { |
| 3213 | size += 1 + pb::CodedOutputStream.ComputeStringSize(OutputType); |
| 3214 | } |
| 3215 | if (options_ != null) { |
| 3216 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 3217 | } |
| 3218 | if (ClientStreaming != false) { |
| 3219 | size += 1 + 1; |
| 3220 | } |
| 3221 | if (ServerStreaming != false) { |
| 3222 | size += 1 + 1; |
| 3223 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3224 | if (_unknownFields != null) { |
| 3225 | size += _unknownFields.CalculateSize(); |
| 3226 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3227 | return size; |
| 3228 | } |
| 3229 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3230 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3231 | public void MergeFrom(MethodDescriptorProto other) { |
| 3232 | if (other == null) { |
| 3233 | return; |
| 3234 | } |
| 3235 | if (other.Name.Length != 0) { |
| 3236 | Name = other.Name; |
| 3237 | } |
| 3238 | if (other.InputType.Length != 0) { |
| 3239 | InputType = other.InputType; |
| 3240 | } |
| 3241 | if (other.OutputType.Length != 0) { |
| 3242 | OutputType = other.OutputType; |
| 3243 | } |
| 3244 | if (other.options_ != null) { |
| 3245 | if (options_ == null) { |
| 3246 | options_ = new global::Google.Protobuf.Reflection.MethodOptions(); |
| 3247 | } |
| 3248 | Options.MergeFrom(other.Options); |
| 3249 | } |
| 3250 | if (other.ClientStreaming != false) { |
| 3251 | ClientStreaming = other.ClientStreaming; |
| 3252 | } |
| 3253 | if (other.ServerStreaming != false) { |
| 3254 | ServerStreaming = other.ServerStreaming; |
| 3255 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3256 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3257 | } |
| 3258 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3259 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3260 | public void MergeFrom(pb::CodedInputStream input) { |
| 3261 | uint tag; |
| 3262 | while ((tag = input.ReadTag()) != 0) { |
| 3263 | switch(tag) { |
| 3264 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3265 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3266 | break; |
| 3267 | case 10: { |
| 3268 | Name = input.ReadString(); |
| 3269 | break; |
| 3270 | } |
| 3271 | case 18: { |
| 3272 | InputType = input.ReadString(); |
| 3273 | break; |
| 3274 | } |
| 3275 | case 26: { |
| 3276 | OutputType = input.ReadString(); |
| 3277 | break; |
| 3278 | } |
| 3279 | case 34: { |
| 3280 | if (options_ == null) { |
| 3281 | options_ = new global::Google.Protobuf.Reflection.MethodOptions(); |
| 3282 | } |
| 3283 | input.ReadMessage(options_); |
| 3284 | break; |
| 3285 | } |
| 3286 | case 40: { |
| 3287 | ClientStreaming = input.ReadBool(); |
| 3288 | break; |
| 3289 | } |
| 3290 | case 48: { |
| 3291 | ServerStreaming = input.ReadBool(); |
| 3292 | break; |
| 3293 | } |
| 3294 | } |
| 3295 | } |
| 3296 | } |
| 3297 | |
| 3298 | } |
| 3299 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3300 | internal sealed partial class FileOptions : pb::IMessage<FileOptions> { |
| 3301 | private static readonly pb::MessageParser<FileOptions> _parser = new pb::MessageParser<FileOptions>(() => new FileOptions()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3302 | private pb::UnknownFieldSet _unknownFields; |
| 3303 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3304 | public static pb::MessageParser<FileOptions> Parser { get { return _parser; } } |
| 3305 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3306 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3307 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3308 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[10]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3309 | } |
| 3310 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3311 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3312 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3313 | get { return Descriptor; } |
| 3314 | } |
| 3315 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3316 | internal CustomOptions CustomOptions{ get; private set; } = CustomOptions.Empty; |
| 3317 | |
| 3318 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3319 | public FileOptions() { |
| 3320 | OnConstruction(); |
| 3321 | } |
| 3322 | |
| 3323 | partial void OnConstruction(); |
| 3324 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3325 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3326 | public FileOptions(FileOptions other) : this() { |
| 3327 | javaPackage_ = other.javaPackage_; |
| 3328 | javaOuterClassname_ = other.javaOuterClassname_; |
| 3329 | javaMultipleFiles_ = other.javaMultipleFiles_; |
| 3330 | javaGenerateEqualsAndHash_ = other.javaGenerateEqualsAndHash_; |
| 3331 | javaStringCheckUtf8_ = other.javaStringCheckUtf8_; |
| 3332 | optimizeFor_ = other.optimizeFor_; |
| 3333 | goPackage_ = other.goPackage_; |
| 3334 | ccGenericServices_ = other.ccGenericServices_; |
| 3335 | javaGenericServices_ = other.javaGenericServices_; |
| 3336 | pyGenericServices_ = other.pyGenericServices_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3337 | phpGenericServices_ = other.phpGenericServices_; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3338 | deprecated_ = other.deprecated_; |
| 3339 | ccEnableArenas_ = other.ccEnableArenas_; |
| 3340 | objcClassPrefix_ = other.objcClassPrefix_; |
| 3341 | csharpNamespace_ = other.csharpNamespace_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3342 | swiftPrefix_ = other.swiftPrefix_; |
| 3343 | phpClassPrefix_ = other.phpClassPrefix_; |
| 3344 | phpNamespace_ = other.phpNamespace_; |
| 3345 | phpMetadataNamespace_ = other.phpMetadataNamespace_; |
| 3346 | rubyPackage_ = other.rubyPackage_; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3347 | uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3348 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3349 | } |
| 3350 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3351 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3352 | public FileOptions Clone() { |
| 3353 | return new FileOptions(this); |
| 3354 | } |
| 3355 | |
| 3356 | /// <summary>Field number for the "java_package" field.</summary> |
| 3357 | public const int JavaPackageFieldNumber = 1; |
| 3358 | private string javaPackage_ = ""; |
| 3359 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3360 | /// Sets the Java package where classes generated from this .proto will be |
| 3361 | /// placed. By default, the proto package is used, but this is often |
| 3362 | /// inappropriate because proto packages do not normally start with backwards |
| 3363 | /// domain names. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3364 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3365 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3366 | public string JavaPackage { |
| 3367 | get { return javaPackage_; } |
| 3368 | set { |
| 3369 | javaPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3370 | } |
| 3371 | } |
| 3372 | |
| 3373 | /// <summary>Field number for the "java_outer_classname" field.</summary> |
| 3374 | public const int JavaOuterClassnameFieldNumber = 8; |
| 3375 | private string javaOuterClassname_ = ""; |
| 3376 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3377 | /// If set, all the classes from the .proto file are wrapped in a single |
| 3378 | /// outer class with the given name. This applies to both Proto1 |
| 3379 | /// (equivalent to the old "--one_java_file" option) and Proto2 (where |
| 3380 | /// a .proto always translates to a single class, but you may want to |
| 3381 | /// explicitly choose the class name). |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3382 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3383 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3384 | public string JavaOuterClassname { |
| 3385 | get { return javaOuterClassname_; } |
| 3386 | set { |
| 3387 | javaOuterClassname_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3388 | } |
| 3389 | } |
| 3390 | |
| 3391 | /// <summary>Field number for the "java_multiple_files" field.</summary> |
| 3392 | public const int JavaMultipleFilesFieldNumber = 10; |
| 3393 | private bool javaMultipleFiles_; |
| 3394 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3395 | /// If set true, then the Java code generator will generate a separate .java |
| 3396 | /// file for each top-level message, enum, and service defined in the .proto |
| 3397 | /// file. Thus, these types will *not* be nested inside the outer class |
| 3398 | /// named by java_outer_classname. However, the outer class will still be |
| 3399 | /// generated to contain the file's getDescriptor() method as well as any |
| 3400 | /// top-level extensions defined in the file. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3401 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3402 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3403 | public bool JavaMultipleFiles { |
| 3404 | get { return javaMultipleFiles_; } |
| 3405 | set { |
| 3406 | javaMultipleFiles_ = value; |
| 3407 | } |
| 3408 | } |
| 3409 | |
| 3410 | /// <summary>Field number for the "java_generate_equals_and_hash" field.</summary> |
| 3411 | public const int JavaGenerateEqualsAndHashFieldNumber = 20; |
| 3412 | private bool javaGenerateEqualsAndHash_; |
| 3413 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3414 | /// This option does nothing. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3415 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3416 | [global::System.ObsoleteAttribute] |
| 3417 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3418 | public bool JavaGenerateEqualsAndHash { |
| 3419 | get { return javaGenerateEqualsAndHash_; } |
| 3420 | set { |
| 3421 | javaGenerateEqualsAndHash_ = value; |
| 3422 | } |
| 3423 | } |
| 3424 | |
| 3425 | /// <summary>Field number for the "java_string_check_utf8" field.</summary> |
| 3426 | public const int JavaStringCheckUtf8FieldNumber = 27; |
| 3427 | private bool javaStringCheckUtf8_; |
| 3428 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3429 | /// If set true, then the Java2 code generator will generate code that |
| 3430 | /// throws an exception whenever an attempt is made to assign a non-UTF-8 |
| 3431 | /// byte sequence to a string field. |
| 3432 | /// Message reflection will do the same. |
| 3433 | /// However, an extension field still accepts non-UTF-8 byte sequences. |
| 3434 | /// This option has no effect on when used with the lite runtime. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3435 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3436 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3437 | public bool JavaStringCheckUtf8 { |
| 3438 | get { return javaStringCheckUtf8_; } |
| 3439 | set { |
| 3440 | javaStringCheckUtf8_ = value; |
| 3441 | } |
| 3442 | } |
| 3443 | |
| 3444 | /// <summary>Field number for the "optimize_for" field.</summary> |
| 3445 | public const int OptimizeForFieldNumber = 9; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3446 | private global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode optimizeFor_ = 0; |
| 3447 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3448 | public global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode OptimizeFor { |
| 3449 | get { return optimizeFor_; } |
| 3450 | set { |
| 3451 | optimizeFor_ = value; |
| 3452 | } |
| 3453 | } |
| 3454 | |
| 3455 | /// <summary>Field number for the "go_package" field.</summary> |
| 3456 | public const int GoPackageFieldNumber = 11; |
| 3457 | private string goPackage_ = ""; |
| 3458 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3459 | /// Sets the Go package where structs generated from this .proto will be |
| 3460 | /// placed. If omitted, the Go package will be derived from the following: |
| 3461 | /// - The basename of the package import path, if provided. |
| 3462 | /// - Otherwise, the package statement in the .proto file, if present. |
| 3463 | /// - Otherwise, the basename of the .proto file, without extension. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3464 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3465 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3466 | public string GoPackage { |
| 3467 | get { return goPackage_; } |
| 3468 | set { |
| 3469 | goPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3470 | } |
| 3471 | } |
| 3472 | |
| 3473 | /// <summary>Field number for the "cc_generic_services" field.</summary> |
| 3474 | public const int CcGenericServicesFieldNumber = 16; |
| 3475 | private bool ccGenericServices_; |
| 3476 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3477 | /// Should generic services be generated in each language? "Generic" services |
| 3478 | /// are not specific to any particular RPC system. They are generated by the |
| 3479 | /// main code generators in each language (without additional plugins). |
| 3480 | /// Generic services were the only kind of service generation supported by |
| 3481 | /// early versions of google.protobuf. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3482 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3483 | /// Generic services are now considered deprecated in favor of using plugins |
| 3484 | /// that generate code specific to your particular RPC system. Therefore, |
| 3485 | /// these default to false. Old code which depends on generic services should |
| 3486 | /// explicitly set them to true. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3487 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3488 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3489 | public bool CcGenericServices { |
| 3490 | get { return ccGenericServices_; } |
| 3491 | set { |
| 3492 | ccGenericServices_ = value; |
| 3493 | } |
| 3494 | } |
| 3495 | |
| 3496 | /// <summary>Field number for the "java_generic_services" field.</summary> |
| 3497 | public const int JavaGenericServicesFieldNumber = 17; |
| 3498 | private bool javaGenericServices_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3499 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3500 | public bool JavaGenericServices { |
| 3501 | get { return javaGenericServices_; } |
| 3502 | set { |
| 3503 | javaGenericServices_ = value; |
| 3504 | } |
| 3505 | } |
| 3506 | |
| 3507 | /// <summary>Field number for the "py_generic_services" field.</summary> |
| 3508 | public const int PyGenericServicesFieldNumber = 18; |
| 3509 | private bool pyGenericServices_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3510 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3511 | public bool PyGenericServices { |
| 3512 | get { return pyGenericServices_; } |
| 3513 | set { |
| 3514 | pyGenericServices_ = value; |
| 3515 | } |
| 3516 | } |
| 3517 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3518 | /// <summary>Field number for the "php_generic_services" field.</summary> |
| 3519 | public const int PhpGenericServicesFieldNumber = 42; |
| 3520 | private bool phpGenericServices_; |
| 3521 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3522 | public bool PhpGenericServices { |
| 3523 | get { return phpGenericServices_; } |
| 3524 | set { |
| 3525 | phpGenericServices_ = value; |
| 3526 | } |
| 3527 | } |
| 3528 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3529 | /// <summary>Field number for the "deprecated" field.</summary> |
| 3530 | public const int DeprecatedFieldNumber = 23; |
| 3531 | private bool deprecated_; |
| 3532 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3533 | /// Is this file deprecated? |
| 3534 | /// Depending on the target platform, this can emit Deprecated annotations |
| 3535 | /// for everything in the file, or it will be completely ignored; in the very |
| 3536 | /// least, this is a formalization for deprecating files. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3537 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3538 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3539 | public bool Deprecated { |
| 3540 | get { return deprecated_; } |
| 3541 | set { |
| 3542 | deprecated_ = value; |
| 3543 | } |
| 3544 | } |
| 3545 | |
| 3546 | /// <summary>Field number for the "cc_enable_arenas" field.</summary> |
| 3547 | public const int CcEnableArenasFieldNumber = 31; |
| 3548 | private bool ccEnableArenas_; |
| 3549 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3550 | /// Enables the use of arenas for the proto messages in this file. This applies |
| 3551 | /// only to generated classes for C++. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3552 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3553 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3554 | public bool CcEnableArenas { |
| 3555 | get { return ccEnableArenas_; } |
| 3556 | set { |
| 3557 | ccEnableArenas_ = value; |
| 3558 | } |
| 3559 | } |
| 3560 | |
| 3561 | /// <summary>Field number for the "objc_class_prefix" field.</summary> |
| 3562 | public const int ObjcClassPrefixFieldNumber = 36; |
| 3563 | private string objcClassPrefix_ = ""; |
| 3564 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3565 | /// Sets the objective c class prefix which is prepended to all objective c |
| 3566 | /// generated classes from this .proto. There is no default. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3567 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3568 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3569 | public string ObjcClassPrefix { |
| 3570 | get { return objcClassPrefix_; } |
| 3571 | set { |
| 3572 | objcClassPrefix_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3573 | } |
| 3574 | } |
| 3575 | |
| 3576 | /// <summary>Field number for the "csharp_namespace" field.</summary> |
| 3577 | public const int CsharpNamespaceFieldNumber = 37; |
| 3578 | private string csharpNamespace_ = ""; |
| 3579 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3580 | /// Namespace for generated classes; defaults to the package. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3581 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3582 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3583 | public string CsharpNamespace { |
| 3584 | get { return csharpNamespace_; } |
| 3585 | set { |
| 3586 | csharpNamespace_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3587 | } |
| 3588 | } |
| 3589 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3590 | /// <summary>Field number for the "swift_prefix" field.</summary> |
| 3591 | public const int SwiftPrefixFieldNumber = 39; |
| 3592 | private string swiftPrefix_ = ""; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3593 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3594 | /// By default Swift generators will take the proto package and CamelCase it |
| 3595 | /// replacing '.' with underscore and use that to prefix the types/symbols |
| 3596 | /// defined. When this options is provided, they will use this value instead |
| 3597 | /// to prefix the types/symbols defined. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3598 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3599 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3600 | public string SwiftPrefix { |
| 3601 | get { return swiftPrefix_; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3602 | set { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3603 | swiftPrefix_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3604 | } |
| 3605 | } |
| 3606 | |
| 3607 | /// <summary>Field number for the "php_class_prefix" field.</summary> |
| 3608 | public const int PhpClassPrefixFieldNumber = 40; |
| 3609 | private string phpClassPrefix_ = ""; |
| 3610 | /// <summary> |
| 3611 | /// Sets the php class prefix which is prepended to all php generated classes |
| 3612 | /// from this .proto. Default is empty. |
| 3613 | /// </summary> |
| 3614 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3615 | public string PhpClassPrefix { |
| 3616 | get { return phpClassPrefix_; } |
| 3617 | set { |
| 3618 | phpClassPrefix_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3619 | } |
| 3620 | } |
| 3621 | |
| 3622 | /// <summary>Field number for the "php_namespace" field.</summary> |
| 3623 | public const int PhpNamespaceFieldNumber = 41; |
| 3624 | private string phpNamespace_ = ""; |
| 3625 | /// <summary> |
| 3626 | /// Use this option to change the namespace of php generated classes. Default |
| 3627 | /// is empty. When this option is empty, the package name will be used for |
| 3628 | /// determining the namespace. |
| 3629 | /// </summary> |
| 3630 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3631 | public string PhpNamespace { |
| 3632 | get { return phpNamespace_; } |
| 3633 | set { |
| 3634 | phpNamespace_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3635 | } |
| 3636 | } |
| 3637 | |
| 3638 | /// <summary>Field number for the "php_metadata_namespace" field.</summary> |
| 3639 | public const int PhpMetadataNamespaceFieldNumber = 44; |
| 3640 | private string phpMetadataNamespace_ = ""; |
| 3641 | /// <summary> |
| 3642 | /// Use this option to change the namespace of php generated metadata classes. |
| 3643 | /// Default is empty. When this option is empty, the proto file name will be used |
| 3644 | /// for determining the namespace. |
| 3645 | /// </summary> |
| 3646 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3647 | public string PhpMetadataNamespace { |
| 3648 | get { return phpMetadataNamespace_; } |
| 3649 | set { |
| 3650 | phpMetadataNamespace_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 3651 | } |
| 3652 | } |
| 3653 | |
| 3654 | /// <summary>Field number for the "ruby_package" field.</summary> |
| 3655 | public const int RubyPackageFieldNumber = 45; |
| 3656 | private string rubyPackage_ = ""; |
| 3657 | /// <summary> |
| 3658 | /// Use this option to change the package of ruby generated classes. Default |
| 3659 | /// is empty. When this option is not set, the package name will be used for |
| 3660 | /// determining the ruby package. |
| 3661 | /// </summary> |
| 3662 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 3663 | public string RubyPackage { |
| 3664 | get { return rubyPackage_; } |
| 3665 | set { |
| 3666 | rubyPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3667 | } |
| 3668 | } |
| 3669 | |
| 3670 | /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 3671 | public const int UninterpretedOptionFieldNumber = 999; |
| 3672 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec |
| 3673 | = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); |
| 3674 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); |
| 3675 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3676 | /// The parser stores options it doesn't recognize here. |
| 3677 | /// See the documentation for the "Options" section above. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3678 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3679 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3680 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { |
| 3681 | get { return uninterpretedOption_; } |
| 3682 | } |
| 3683 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3684 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3685 | public override bool Equals(object other) { |
| 3686 | return Equals(other as FileOptions); |
| 3687 | } |
| 3688 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3689 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3690 | public bool Equals(FileOptions other) { |
| 3691 | if (ReferenceEquals(other, null)) { |
| 3692 | return false; |
| 3693 | } |
| 3694 | if (ReferenceEquals(other, this)) { |
| 3695 | return true; |
| 3696 | } |
| 3697 | if (JavaPackage != other.JavaPackage) return false; |
| 3698 | if (JavaOuterClassname != other.JavaOuterClassname) return false; |
| 3699 | if (JavaMultipleFiles != other.JavaMultipleFiles) return false; |
| 3700 | if (JavaGenerateEqualsAndHash != other.JavaGenerateEqualsAndHash) return false; |
| 3701 | if (JavaStringCheckUtf8 != other.JavaStringCheckUtf8) return false; |
| 3702 | if (OptimizeFor != other.OptimizeFor) return false; |
| 3703 | if (GoPackage != other.GoPackage) return false; |
| 3704 | if (CcGenericServices != other.CcGenericServices) return false; |
| 3705 | if (JavaGenericServices != other.JavaGenericServices) return false; |
| 3706 | if (PyGenericServices != other.PyGenericServices) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3707 | if (PhpGenericServices != other.PhpGenericServices) return false; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3708 | if (Deprecated != other.Deprecated) return false; |
| 3709 | if (CcEnableArenas != other.CcEnableArenas) return false; |
| 3710 | if (ObjcClassPrefix != other.ObjcClassPrefix) return false; |
| 3711 | if (CsharpNamespace != other.CsharpNamespace) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3712 | if (SwiftPrefix != other.SwiftPrefix) return false; |
| 3713 | if (PhpClassPrefix != other.PhpClassPrefix) return false; |
| 3714 | if (PhpNamespace != other.PhpNamespace) return false; |
| 3715 | if (PhpMetadataNamespace != other.PhpMetadataNamespace) return false; |
| 3716 | if (RubyPackage != other.RubyPackage) return false; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3717 | if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3718 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3719 | } |
| 3720 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3721 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3722 | public override int GetHashCode() { |
| 3723 | int hash = 1; |
| 3724 | if (JavaPackage.Length != 0) hash ^= JavaPackage.GetHashCode(); |
| 3725 | if (JavaOuterClassname.Length != 0) hash ^= JavaOuterClassname.GetHashCode(); |
| 3726 | if (JavaMultipleFiles != false) hash ^= JavaMultipleFiles.GetHashCode(); |
| 3727 | if (JavaGenerateEqualsAndHash != false) hash ^= JavaGenerateEqualsAndHash.GetHashCode(); |
| 3728 | if (JavaStringCheckUtf8 != false) hash ^= JavaStringCheckUtf8.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3729 | if (OptimizeFor != 0) hash ^= OptimizeFor.GetHashCode(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3730 | if (GoPackage.Length != 0) hash ^= GoPackage.GetHashCode(); |
| 3731 | if (CcGenericServices != false) hash ^= CcGenericServices.GetHashCode(); |
| 3732 | if (JavaGenericServices != false) hash ^= JavaGenericServices.GetHashCode(); |
| 3733 | if (PyGenericServices != false) hash ^= PyGenericServices.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3734 | if (PhpGenericServices != false) hash ^= PhpGenericServices.GetHashCode(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3735 | if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 3736 | if (CcEnableArenas != false) hash ^= CcEnableArenas.GetHashCode(); |
| 3737 | if (ObjcClassPrefix.Length != 0) hash ^= ObjcClassPrefix.GetHashCode(); |
| 3738 | if (CsharpNamespace.Length != 0) hash ^= CsharpNamespace.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3739 | if (SwiftPrefix.Length != 0) hash ^= SwiftPrefix.GetHashCode(); |
| 3740 | if (PhpClassPrefix.Length != 0) hash ^= PhpClassPrefix.GetHashCode(); |
| 3741 | if (PhpNamespace.Length != 0) hash ^= PhpNamespace.GetHashCode(); |
| 3742 | if (PhpMetadataNamespace.Length != 0) hash ^= PhpMetadataNamespace.GetHashCode(); |
| 3743 | if (RubyPackage.Length != 0) hash ^= RubyPackage.GetHashCode(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3744 | hash ^= uninterpretedOption_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3745 | if (_unknownFields != null) { |
| 3746 | hash ^= _unknownFields.GetHashCode(); |
| 3747 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3748 | return hash; |
| 3749 | } |
| 3750 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3751 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3752 | public override string ToString() { |
| 3753 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 3754 | } |
| 3755 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3756 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3757 | public void WriteTo(pb::CodedOutputStream output) { |
| 3758 | if (JavaPackage.Length != 0) { |
| 3759 | output.WriteRawTag(10); |
| 3760 | output.WriteString(JavaPackage); |
| 3761 | } |
| 3762 | if (JavaOuterClassname.Length != 0) { |
| 3763 | output.WriteRawTag(66); |
| 3764 | output.WriteString(JavaOuterClassname); |
| 3765 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3766 | if (OptimizeFor != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3767 | output.WriteRawTag(72); |
| 3768 | output.WriteEnum((int) OptimizeFor); |
| 3769 | } |
| 3770 | if (JavaMultipleFiles != false) { |
| 3771 | output.WriteRawTag(80); |
| 3772 | output.WriteBool(JavaMultipleFiles); |
| 3773 | } |
| 3774 | if (GoPackage.Length != 0) { |
| 3775 | output.WriteRawTag(90); |
| 3776 | output.WriteString(GoPackage); |
| 3777 | } |
| 3778 | if (CcGenericServices != false) { |
| 3779 | output.WriteRawTag(128, 1); |
| 3780 | output.WriteBool(CcGenericServices); |
| 3781 | } |
| 3782 | if (JavaGenericServices != false) { |
| 3783 | output.WriteRawTag(136, 1); |
| 3784 | output.WriteBool(JavaGenericServices); |
| 3785 | } |
| 3786 | if (PyGenericServices != false) { |
| 3787 | output.WriteRawTag(144, 1); |
| 3788 | output.WriteBool(PyGenericServices); |
| 3789 | } |
| 3790 | if (JavaGenerateEqualsAndHash != false) { |
| 3791 | output.WriteRawTag(160, 1); |
| 3792 | output.WriteBool(JavaGenerateEqualsAndHash); |
| 3793 | } |
| 3794 | if (Deprecated != false) { |
| 3795 | output.WriteRawTag(184, 1); |
| 3796 | output.WriteBool(Deprecated); |
| 3797 | } |
| 3798 | if (JavaStringCheckUtf8 != false) { |
| 3799 | output.WriteRawTag(216, 1); |
| 3800 | output.WriteBool(JavaStringCheckUtf8); |
| 3801 | } |
| 3802 | if (CcEnableArenas != false) { |
| 3803 | output.WriteRawTag(248, 1); |
| 3804 | output.WriteBool(CcEnableArenas); |
| 3805 | } |
| 3806 | if (ObjcClassPrefix.Length != 0) { |
| 3807 | output.WriteRawTag(162, 2); |
| 3808 | output.WriteString(ObjcClassPrefix); |
| 3809 | } |
| 3810 | if (CsharpNamespace.Length != 0) { |
| 3811 | output.WriteRawTag(170, 2); |
| 3812 | output.WriteString(CsharpNamespace); |
| 3813 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3814 | if (SwiftPrefix.Length != 0) { |
| 3815 | output.WriteRawTag(186, 2); |
| 3816 | output.WriteString(SwiftPrefix); |
| 3817 | } |
| 3818 | if (PhpClassPrefix.Length != 0) { |
| 3819 | output.WriteRawTag(194, 2); |
| 3820 | output.WriteString(PhpClassPrefix); |
| 3821 | } |
| 3822 | if (PhpNamespace.Length != 0) { |
| 3823 | output.WriteRawTag(202, 2); |
| 3824 | output.WriteString(PhpNamespace); |
| 3825 | } |
| 3826 | if (PhpGenericServices != false) { |
| 3827 | output.WriteRawTag(208, 2); |
| 3828 | output.WriteBool(PhpGenericServices); |
| 3829 | } |
| 3830 | if (PhpMetadataNamespace.Length != 0) { |
| 3831 | output.WriteRawTag(226, 2); |
| 3832 | output.WriteString(PhpMetadataNamespace); |
| 3833 | } |
| 3834 | if (RubyPackage.Length != 0) { |
| 3835 | output.WriteRawTag(234, 2); |
| 3836 | output.WriteString(RubyPackage); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3837 | } |
| 3838 | uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3839 | if (_unknownFields != null) { |
| 3840 | _unknownFields.WriteTo(output); |
| 3841 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3842 | } |
| 3843 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3844 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3845 | public int CalculateSize() { |
| 3846 | int size = 0; |
| 3847 | if (JavaPackage.Length != 0) { |
| 3848 | size += 1 + pb::CodedOutputStream.ComputeStringSize(JavaPackage); |
| 3849 | } |
| 3850 | if (JavaOuterClassname.Length != 0) { |
| 3851 | size += 1 + pb::CodedOutputStream.ComputeStringSize(JavaOuterClassname); |
| 3852 | } |
| 3853 | if (JavaMultipleFiles != false) { |
| 3854 | size += 1 + 1; |
| 3855 | } |
| 3856 | if (JavaGenerateEqualsAndHash != false) { |
| 3857 | size += 2 + 1; |
| 3858 | } |
| 3859 | if (JavaStringCheckUtf8 != false) { |
| 3860 | size += 2 + 1; |
| 3861 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3862 | if (OptimizeFor != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3863 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) OptimizeFor); |
| 3864 | } |
| 3865 | if (GoPackage.Length != 0) { |
| 3866 | size += 1 + pb::CodedOutputStream.ComputeStringSize(GoPackage); |
| 3867 | } |
| 3868 | if (CcGenericServices != false) { |
| 3869 | size += 2 + 1; |
| 3870 | } |
| 3871 | if (JavaGenericServices != false) { |
| 3872 | size += 2 + 1; |
| 3873 | } |
| 3874 | if (PyGenericServices != false) { |
| 3875 | size += 2 + 1; |
| 3876 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3877 | if (PhpGenericServices != false) { |
| 3878 | size += 2 + 1; |
| 3879 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3880 | if (Deprecated != false) { |
| 3881 | size += 2 + 1; |
| 3882 | } |
| 3883 | if (CcEnableArenas != false) { |
| 3884 | size += 2 + 1; |
| 3885 | } |
| 3886 | if (ObjcClassPrefix.Length != 0) { |
| 3887 | size += 2 + pb::CodedOutputStream.ComputeStringSize(ObjcClassPrefix); |
| 3888 | } |
| 3889 | if (CsharpNamespace.Length != 0) { |
| 3890 | size += 2 + pb::CodedOutputStream.ComputeStringSize(CsharpNamespace); |
| 3891 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3892 | if (SwiftPrefix.Length != 0) { |
| 3893 | size += 2 + pb::CodedOutputStream.ComputeStringSize(SwiftPrefix); |
| 3894 | } |
| 3895 | if (PhpClassPrefix.Length != 0) { |
| 3896 | size += 2 + pb::CodedOutputStream.ComputeStringSize(PhpClassPrefix); |
| 3897 | } |
| 3898 | if (PhpNamespace.Length != 0) { |
| 3899 | size += 2 + pb::CodedOutputStream.ComputeStringSize(PhpNamespace); |
| 3900 | } |
| 3901 | if (PhpMetadataNamespace.Length != 0) { |
| 3902 | size += 2 + pb::CodedOutputStream.ComputeStringSize(PhpMetadataNamespace); |
| 3903 | } |
| 3904 | if (RubyPackage.Length != 0) { |
| 3905 | size += 2 + pb::CodedOutputStream.ComputeStringSize(RubyPackage); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3906 | } |
| 3907 | size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3908 | if (_unknownFields != null) { |
| 3909 | size += _unknownFields.CalculateSize(); |
| 3910 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3911 | return size; |
| 3912 | } |
| 3913 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3914 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3915 | public void MergeFrom(FileOptions other) { |
| 3916 | if (other == null) { |
| 3917 | return; |
| 3918 | } |
| 3919 | if (other.JavaPackage.Length != 0) { |
| 3920 | JavaPackage = other.JavaPackage; |
| 3921 | } |
| 3922 | if (other.JavaOuterClassname.Length != 0) { |
| 3923 | JavaOuterClassname = other.JavaOuterClassname; |
| 3924 | } |
| 3925 | if (other.JavaMultipleFiles != false) { |
| 3926 | JavaMultipleFiles = other.JavaMultipleFiles; |
| 3927 | } |
| 3928 | if (other.JavaGenerateEqualsAndHash != false) { |
| 3929 | JavaGenerateEqualsAndHash = other.JavaGenerateEqualsAndHash; |
| 3930 | } |
| 3931 | if (other.JavaStringCheckUtf8 != false) { |
| 3932 | JavaStringCheckUtf8 = other.JavaStringCheckUtf8; |
| 3933 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3934 | if (other.OptimizeFor != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3935 | OptimizeFor = other.OptimizeFor; |
| 3936 | } |
| 3937 | if (other.GoPackage.Length != 0) { |
| 3938 | GoPackage = other.GoPackage; |
| 3939 | } |
| 3940 | if (other.CcGenericServices != false) { |
| 3941 | CcGenericServices = other.CcGenericServices; |
| 3942 | } |
| 3943 | if (other.JavaGenericServices != false) { |
| 3944 | JavaGenericServices = other.JavaGenericServices; |
| 3945 | } |
| 3946 | if (other.PyGenericServices != false) { |
| 3947 | PyGenericServices = other.PyGenericServices; |
| 3948 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3949 | if (other.PhpGenericServices != false) { |
| 3950 | PhpGenericServices = other.PhpGenericServices; |
| 3951 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3952 | if (other.Deprecated != false) { |
| 3953 | Deprecated = other.Deprecated; |
| 3954 | } |
| 3955 | if (other.CcEnableArenas != false) { |
| 3956 | CcEnableArenas = other.CcEnableArenas; |
| 3957 | } |
| 3958 | if (other.ObjcClassPrefix.Length != 0) { |
| 3959 | ObjcClassPrefix = other.ObjcClassPrefix; |
| 3960 | } |
| 3961 | if (other.CsharpNamespace.Length != 0) { |
| 3962 | CsharpNamespace = other.CsharpNamespace; |
| 3963 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3964 | if (other.SwiftPrefix.Length != 0) { |
| 3965 | SwiftPrefix = other.SwiftPrefix; |
| 3966 | } |
| 3967 | if (other.PhpClassPrefix.Length != 0) { |
| 3968 | PhpClassPrefix = other.PhpClassPrefix; |
| 3969 | } |
| 3970 | if (other.PhpNamespace.Length != 0) { |
| 3971 | PhpNamespace = other.PhpNamespace; |
| 3972 | } |
| 3973 | if (other.PhpMetadataNamespace.Length != 0) { |
| 3974 | PhpMetadataNamespace = other.PhpMetadataNamespace; |
| 3975 | } |
| 3976 | if (other.RubyPackage.Length != 0) { |
| 3977 | RubyPackage = other.RubyPackage; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3978 | } |
| 3979 | uninterpretedOption_.Add(other.uninterpretedOption_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3980 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3981 | } |
| 3982 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3983 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3984 | public void MergeFrom(pb::CodedInputStream input) { |
| 3985 | uint tag; |
| 3986 | while ((tag = input.ReadTag()) != 0) { |
| 3987 | switch(tag) { |
| 3988 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 3989 | CustomOptions = CustomOptions.ReadOrSkipUnknownField(input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 3990 | break; |
| 3991 | case 10: { |
| 3992 | JavaPackage = input.ReadString(); |
| 3993 | break; |
| 3994 | } |
| 3995 | case 66: { |
| 3996 | JavaOuterClassname = input.ReadString(); |
| 3997 | break; |
| 3998 | } |
| 3999 | case 72: { |
| 4000 | optimizeFor_ = (global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode) input.ReadEnum(); |
| 4001 | break; |
| 4002 | } |
| 4003 | case 80: { |
| 4004 | JavaMultipleFiles = input.ReadBool(); |
| 4005 | break; |
| 4006 | } |
| 4007 | case 90: { |
| 4008 | GoPackage = input.ReadString(); |
| 4009 | break; |
| 4010 | } |
| 4011 | case 128: { |
| 4012 | CcGenericServices = input.ReadBool(); |
| 4013 | break; |
| 4014 | } |
| 4015 | case 136: { |
| 4016 | JavaGenericServices = input.ReadBool(); |
| 4017 | break; |
| 4018 | } |
| 4019 | case 144: { |
| 4020 | PyGenericServices = input.ReadBool(); |
| 4021 | break; |
| 4022 | } |
| 4023 | case 160: { |
| 4024 | JavaGenerateEqualsAndHash = input.ReadBool(); |
| 4025 | break; |
| 4026 | } |
| 4027 | case 184: { |
| 4028 | Deprecated = input.ReadBool(); |
| 4029 | break; |
| 4030 | } |
| 4031 | case 216: { |
| 4032 | JavaStringCheckUtf8 = input.ReadBool(); |
| 4033 | break; |
| 4034 | } |
| 4035 | case 248: { |
| 4036 | CcEnableArenas = input.ReadBool(); |
| 4037 | break; |
| 4038 | } |
| 4039 | case 290: { |
| 4040 | ObjcClassPrefix = input.ReadString(); |
| 4041 | break; |
| 4042 | } |
| 4043 | case 298: { |
| 4044 | CsharpNamespace = input.ReadString(); |
| 4045 | break; |
| 4046 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4047 | case 314: { |
| 4048 | SwiftPrefix = input.ReadString(); |
| 4049 | break; |
| 4050 | } |
| 4051 | case 322: { |
| 4052 | PhpClassPrefix = input.ReadString(); |
| 4053 | break; |
| 4054 | } |
| 4055 | case 330: { |
| 4056 | PhpNamespace = input.ReadString(); |
| 4057 | break; |
| 4058 | } |
| 4059 | case 336: { |
| 4060 | PhpGenericServices = input.ReadBool(); |
| 4061 | break; |
| 4062 | } |
| 4063 | case 354: { |
| 4064 | PhpMetadataNamespace = input.ReadString(); |
| 4065 | break; |
| 4066 | } |
| 4067 | case 362: { |
| 4068 | RubyPackage = input.ReadString(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4069 | break; |
| 4070 | } |
| 4071 | case 7994: { |
| 4072 | uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec); |
| 4073 | break; |
| 4074 | } |
| 4075 | } |
| 4076 | } |
| 4077 | } |
| 4078 | |
| 4079 | #region Nested types |
| 4080 | /// <summary>Container for nested types declared in the FileOptions message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4081 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4082 | public static partial class Types { |
| 4083 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4084 | /// Generated classes can be optimized for speed or code size. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4085 | /// </summary> |
| 4086 | internal enum OptimizeMode { |
| 4087 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4088 | /// Generate complete code for parsing, serialization, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4089 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4090 | [pbr::OriginalName("SPEED")] Speed = 1, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4091 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4092 | /// etc. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4093 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4094 | [pbr::OriginalName("CODE_SIZE")] CodeSize = 2, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4095 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4096 | /// Generate code using MessageLite and the lite runtime. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4097 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4098 | [pbr::OriginalName("LITE_RUNTIME")] LiteRuntime = 3, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4099 | } |
| 4100 | |
| 4101 | } |
| 4102 | #endregion |
| 4103 | |
| 4104 | } |
| 4105 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4106 | internal sealed partial class MessageOptions : pb::IMessage<MessageOptions> { |
| 4107 | private static readonly pb::MessageParser<MessageOptions> _parser = new pb::MessageParser<MessageOptions>(() => new MessageOptions()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4108 | private pb::UnknownFieldSet _unknownFields; |
| 4109 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4110 | public static pb::MessageParser<MessageOptions> Parser { get { return _parser; } } |
| 4111 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4112 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4113 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4114 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[11]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4115 | } |
| 4116 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4117 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4118 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4119 | get { return Descriptor; } |
| 4120 | } |
| 4121 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4122 | internal CustomOptions CustomOptions{ get; private set; } = CustomOptions.Empty; |
| 4123 | |
| 4124 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4125 | public MessageOptions() { |
| 4126 | OnConstruction(); |
| 4127 | } |
| 4128 | |
| 4129 | partial void OnConstruction(); |
| 4130 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4131 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4132 | public MessageOptions(MessageOptions other) : this() { |
| 4133 | messageSetWireFormat_ = other.messageSetWireFormat_; |
| 4134 | noStandardDescriptorAccessor_ = other.noStandardDescriptorAccessor_; |
| 4135 | deprecated_ = other.deprecated_; |
| 4136 | mapEntry_ = other.mapEntry_; |
| 4137 | uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4138 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4139 | } |
| 4140 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4141 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4142 | public MessageOptions Clone() { |
| 4143 | return new MessageOptions(this); |
| 4144 | } |
| 4145 | |
| 4146 | /// <summary>Field number for the "message_set_wire_format" field.</summary> |
| 4147 | public const int MessageSetWireFormatFieldNumber = 1; |
| 4148 | private bool messageSetWireFormat_; |
| 4149 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4150 | /// Set true to use the old proto1 MessageSet wire format for extensions. |
| 4151 | /// This is provided for backwards-compatibility with the MessageSet wire |
| 4152 | /// format. You should not use this for any other reason: It's less |
| 4153 | /// efficient, has fewer features, and is more complicated. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4154 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4155 | /// The message must be defined exactly as follows: |
| 4156 | /// message Foo { |
| 4157 | /// option message_set_wire_format = true; |
| 4158 | /// extensions 4 to max; |
| 4159 | /// } |
| 4160 | /// Note that the message cannot have any defined fields; MessageSets only |
| 4161 | /// have extensions. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4162 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4163 | /// All extensions of your type must be singular messages; e.g. they cannot |
| 4164 | /// be int32s, enums, or repeated messages. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4165 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4166 | /// Because this is an option, the above two restrictions are not enforced by |
| 4167 | /// the protocol compiler. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4168 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4169 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4170 | public bool MessageSetWireFormat { |
| 4171 | get { return messageSetWireFormat_; } |
| 4172 | set { |
| 4173 | messageSetWireFormat_ = value; |
| 4174 | } |
| 4175 | } |
| 4176 | |
| 4177 | /// <summary>Field number for the "no_standard_descriptor_accessor" field.</summary> |
| 4178 | public const int NoStandardDescriptorAccessorFieldNumber = 2; |
| 4179 | private bool noStandardDescriptorAccessor_; |
| 4180 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4181 | /// Disables the generation of the standard "descriptor()" accessor, which can |
| 4182 | /// conflict with a field of the same name. This is meant to make migration |
| 4183 | /// from proto1 easier; new code should avoid fields named "descriptor". |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4184 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4185 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4186 | public bool NoStandardDescriptorAccessor { |
| 4187 | get { return noStandardDescriptorAccessor_; } |
| 4188 | set { |
| 4189 | noStandardDescriptorAccessor_ = value; |
| 4190 | } |
| 4191 | } |
| 4192 | |
| 4193 | /// <summary>Field number for the "deprecated" field.</summary> |
| 4194 | public const int DeprecatedFieldNumber = 3; |
| 4195 | private bool deprecated_; |
| 4196 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4197 | /// Is this message deprecated? |
| 4198 | /// Depending on the target platform, this can emit Deprecated annotations |
| 4199 | /// for the message, or it will be completely ignored; in the very least, |
| 4200 | /// this is a formalization for deprecating messages. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4201 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4202 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4203 | public bool Deprecated { |
| 4204 | get { return deprecated_; } |
| 4205 | set { |
| 4206 | deprecated_ = value; |
| 4207 | } |
| 4208 | } |
| 4209 | |
| 4210 | /// <summary>Field number for the "map_entry" field.</summary> |
| 4211 | public const int MapEntryFieldNumber = 7; |
| 4212 | private bool mapEntry_; |
| 4213 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4214 | /// Whether the message is an automatically generated map entry type for the |
| 4215 | /// maps field. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4216 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4217 | /// For maps fields: |
| 4218 | /// map<KeyType, ValueType> map_field = 1; |
| 4219 | /// The parsed descriptor looks like: |
| 4220 | /// message MapFieldEntry { |
| 4221 | /// option map_entry = true; |
| 4222 | /// optional KeyType key = 1; |
| 4223 | /// optional ValueType value = 2; |
| 4224 | /// } |
| 4225 | /// repeated MapFieldEntry map_field = 1; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4226 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4227 | /// Implementations may choose not to generate the map_entry=true message, but |
| 4228 | /// use a native map in the target language to hold the keys and values. |
| 4229 | /// The reflection APIs in such implementions still need to work as |
| 4230 | /// if the field is a repeated message field. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4231 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4232 | /// NOTE: Do not set the option in .proto files. Always use the maps syntax |
| 4233 | /// instead. The option should only be implicitly set by the proto compiler |
| 4234 | /// parser. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4235 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4236 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4237 | public bool MapEntry { |
| 4238 | get { return mapEntry_; } |
| 4239 | set { |
| 4240 | mapEntry_ = value; |
| 4241 | } |
| 4242 | } |
| 4243 | |
| 4244 | /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 4245 | public const int UninterpretedOptionFieldNumber = 999; |
| 4246 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec |
| 4247 | = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); |
| 4248 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); |
| 4249 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4250 | /// The parser stores options it doesn't recognize here. See above. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4251 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4252 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4253 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { |
| 4254 | get { return uninterpretedOption_; } |
| 4255 | } |
| 4256 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4257 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4258 | public override bool Equals(object other) { |
| 4259 | return Equals(other as MessageOptions); |
| 4260 | } |
| 4261 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4262 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4263 | public bool Equals(MessageOptions other) { |
| 4264 | if (ReferenceEquals(other, null)) { |
| 4265 | return false; |
| 4266 | } |
| 4267 | if (ReferenceEquals(other, this)) { |
| 4268 | return true; |
| 4269 | } |
| 4270 | if (MessageSetWireFormat != other.MessageSetWireFormat) return false; |
| 4271 | if (NoStandardDescriptorAccessor != other.NoStandardDescriptorAccessor) return false; |
| 4272 | if (Deprecated != other.Deprecated) return false; |
| 4273 | if (MapEntry != other.MapEntry) return false; |
| 4274 | if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4275 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4276 | } |
| 4277 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4278 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4279 | public override int GetHashCode() { |
| 4280 | int hash = 1; |
| 4281 | if (MessageSetWireFormat != false) hash ^= MessageSetWireFormat.GetHashCode(); |
| 4282 | if (NoStandardDescriptorAccessor != false) hash ^= NoStandardDescriptorAccessor.GetHashCode(); |
| 4283 | if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 4284 | if (MapEntry != false) hash ^= MapEntry.GetHashCode(); |
| 4285 | hash ^= uninterpretedOption_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4286 | if (_unknownFields != null) { |
| 4287 | hash ^= _unknownFields.GetHashCode(); |
| 4288 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4289 | return hash; |
| 4290 | } |
| 4291 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4292 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4293 | public override string ToString() { |
| 4294 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 4295 | } |
| 4296 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4297 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4298 | public void WriteTo(pb::CodedOutputStream output) { |
| 4299 | if (MessageSetWireFormat != false) { |
| 4300 | output.WriteRawTag(8); |
| 4301 | output.WriteBool(MessageSetWireFormat); |
| 4302 | } |
| 4303 | if (NoStandardDescriptorAccessor != false) { |
| 4304 | output.WriteRawTag(16); |
| 4305 | output.WriteBool(NoStandardDescriptorAccessor); |
| 4306 | } |
| 4307 | if (Deprecated != false) { |
| 4308 | output.WriteRawTag(24); |
| 4309 | output.WriteBool(Deprecated); |
| 4310 | } |
| 4311 | if (MapEntry != false) { |
| 4312 | output.WriteRawTag(56); |
| 4313 | output.WriteBool(MapEntry); |
| 4314 | } |
| 4315 | uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4316 | if (_unknownFields != null) { |
| 4317 | _unknownFields.WriteTo(output); |
| 4318 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4319 | } |
| 4320 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4321 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4322 | public int CalculateSize() { |
| 4323 | int size = 0; |
| 4324 | if (MessageSetWireFormat != false) { |
| 4325 | size += 1 + 1; |
| 4326 | } |
| 4327 | if (NoStandardDescriptorAccessor != false) { |
| 4328 | size += 1 + 1; |
| 4329 | } |
| 4330 | if (Deprecated != false) { |
| 4331 | size += 1 + 1; |
| 4332 | } |
| 4333 | if (MapEntry != false) { |
| 4334 | size += 1 + 1; |
| 4335 | } |
| 4336 | size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4337 | if (_unknownFields != null) { |
| 4338 | size += _unknownFields.CalculateSize(); |
| 4339 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4340 | return size; |
| 4341 | } |
| 4342 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4343 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4344 | public void MergeFrom(MessageOptions other) { |
| 4345 | if (other == null) { |
| 4346 | return; |
| 4347 | } |
| 4348 | if (other.MessageSetWireFormat != false) { |
| 4349 | MessageSetWireFormat = other.MessageSetWireFormat; |
| 4350 | } |
| 4351 | if (other.NoStandardDescriptorAccessor != false) { |
| 4352 | NoStandardDescriptorAccessor = other.NoStandardDescriptorAccessor; |
| 4353 | } |
| 4354 | if (other.Deprecated != false) { |
| 4355 | Deprecated = other.Deprecated; |
| 4356 | } |
| 4357 | if (other.MapEntry != false) { |
| 4358 | MapEntry = other.MapEntry; |
| 4359 | } |
| 4360 | uninterpretedOption_.Add(other.uninterpretedOption_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4361 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4362 | } |
| 4363 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4364 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4365 | public void MergeFrom(pb::CodedInputStream input) { |
| 4366 | uint tag; |
| 4367 | while ((tag = input.ReadTag()) != 0) { |
| 4368 | switch(tag) { |
| 4369 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4370 | CustomOptions = CustomOptions.ReadOrSkipUnknownField(input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4371 | break; |
| 4372 | case 8: { |
| 4373 | MessageSetWireFormat = input.ReadBool(); |
| 4374 | break; |
| 4375 | } |
| 4376 | case 16: { |
| 4377 | NoStandardDescriptorAccessor = input.ReadBool(); |
| 4378 | break; |
| 4379 | } |
| 4380 | case 24: { |
| 4381 | Deprecated = input.ReadBool(); |
| 4382 | break; |
| 4383 | } |
| 4384 | case 56: { |
| 4385 | MapEntry = input.ReadBool(); |
| 4386 | break; |
| 4387 | } |
| 4388 | case 7994: { |
| 4389 | uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec); |
| 4390 | break; |
| 4391 | } |
| 4392 | } |
| 4393 | } |
| 4394 | } |
| 4395 | |
| 4396 | } |
| 4397 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4398 | internal sealed partial class FieldOptions : pb::IMessage<FieldOptions> { |
| 4399 | private static readonly pb::MessageParser<FieldOptions> _parser = new pb::MessageParser<FieldOptions>(() => new FieldOptions()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4400 | private pb::UnknownFieldSet _unknownFields; |
| 4401 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4402 | public static pb::MessageParser<FieldOptions> Parser { get { return _parser; } } |
| 4403 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4404 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4405 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4406 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[12]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4407 | } |
| 4408 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4409 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4410 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4411 | get { return Descriptor; } |
| 4412 | } |
| 4413 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4414 | internal CustomOptions CustomOptions{ get; private set; } = CustomOptions.Empty; |
| 4415 | |
| 4416 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4417 | public FieldOptions() { |
| 4418 | OnConstruction(); |
| 4419 | } |
| 4420 | |
| 4421 | partial void OnConstruction(); |
| 4422 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4423 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4424 | public FieldOptions(FieldOptions other) : this() { |
| 4425 | ctype_ = other.ctype_; |
| 4426 | packed_ = other.packed_; |
| 4427 | jstype_ = other.jstype_; |
| 4428 | lazy_ = other.lazy_; |
| 4429 | deprecated_ = other.deprecated_; |
| 4430 | weak_ = other.weak_; |
| 4431 | uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4432 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4433 | } |
| 4434 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4435 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4436 | public FieldOptions Clone() { |
| 4437 | return new FieldOptions(this); |
| 4438 | } |
| 4439 | |
| 4440 | /// <summary>Field number for the "ctype" field.</summary> |
| 4441 | public const int CtypeFieldNumber = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4442 | private global::Google.Protobuf.Reflection.FieldOptions.Types.CType ctype_ = 0; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4443 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4444 | /// The ctype option instructs the C++ code generator to use a different |
| 4445 | /// representation of the field than it normally would. See the specific |
| 4446 | /// options below. This option is not yet implemented in the open source |
| 4447 | /// release -- sorry, we'll try to include it in a future version! |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4448 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4449 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4450 | public global::Google.Protobuf.Reflection.FieldOptions.Types.CType Ctype { |
| 4451 | get { return ctype_; } |
| 4452 | set { |
| 4453 | ctype_ = value; |
| 4454 | } |
| 4455 | } |
| 4456 | |
| 4457 | /// <summary>Field number for the "packed" field.</summary> |
| 4458 | public const int PackedFieldNumber = 2; |
| 4459 | private bool packed_; |
| 4460 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4461 | /// The packed option can be enabled for repeated primitive fields to enable |
| 4462 | /// a more efficient representation on the wire. Rather than repeatedly |
| 4463 | /// writing the tag and type for each element, the entire array is encoded as |
| 4464 | /// a single length-delimited blob. In proto3, only explicit setting it to |
| 4465 | /// false will avoid using packed encoding. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4466 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4467 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4468 | public bool Packed { |
| 4469 | get { return packed_; } |
| 4470 | set { |
| 4471 | packed_ = value; |
| 4472 | } |
| 4473 | } |
| 4474 | |
| 4475 | /// <summary>Field number for the "jstype" field.</summary> |
| 4476 | public const int JstypeFieldNumber = 6; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4477 | private global::Google.Protobuf.Reflection.FieldOptions.Types.JSType jstype_ = 0; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4478 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4479 | /// The jstype option determines the JavaScript type used for values of the |
| 4480 | /// field. The option is permitted only for 64 bit integral and fixed types |
| 4481 | /// (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING |
| 4482 | /// is represented as JavaScript string, which avoids loss of precision that |
| 4483 | /// can happen when a large value is converted to a floating point JavaScript. |
| 4484 | /// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to |
| 4485 | /// use the JavaScript "number" type. The behavior of the default option |
| 4486 | /// JS_NORMAL is implementation dependent. |
| 4487 | /// |
| 4488 | /// This option is an enum to permit additional types to be added, e.g. |
| 4489 | /// goog.math.Integer. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4490 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4491 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4492 | public global::Google.Protobuf.Reflection.FieldOptions.Types.JSType Jstype { |
| 4493 | get { return jstype_; } |
| 4494 | set { |
| 4495 | jstype_ = value; |
| 4496 | } |
| 4497 | } |
| 4498 | |
| 4499 | /// <summary>Field number for the "lazy" field.</summary> |
| 4500 | public const int LazyFieldNumber = 5; |
| 4501 | private bool lazy_; |
| 4502 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4503 | /// Should this field be parsed lazily? Lazy applies only to message-type |
| 4504 | /// fields. It means that when the outer message is initially parsed, the |
| 4505 | /// inner message's contents will not be parsed but instead stored in encoded |
| 4506 | /// form. The inner message will actually be parsed when it is first accessed. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4507 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4508 | /// This is only a hint. Implementations are free to choose whether to use |
| 4509 | /// eager or lazy parsing regardless of the value of this option. However, |
| 4510 | /// setting this option true suggests that the protocol author believes that |
| 4511 | /// using lazy parsing on this field is worth the additional bookkeeping |
| 4512 | /// overhead typically needed to implement it. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4513 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4514 | /// This option does not affect the public interface of any generated code; |
| 4515 | /// all method signatures remain the same. Furthermore, thread-safety of the |
| 4516 | /// interface is not affected by this option; const methods remain safe to |
| 4517 | /// call from multiple threads concurrently, while non-const methods continue |
| 4518 | /// to require exclusive access. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4519 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4520 | /// Note that implementations may choose not to check required fields within |
| 4521 | /// a lazy sub-message. That is, calling IsInitialized() on the outer message |
| 4522 | /// may return true even if the inner message has missing required fields. |
| 4523 | /// This is necessary because otherwise the inner message would have to be |
| 4524 | /// parsed in order to perform the check, defeating the purpose of lazy |
| 4525 | /// parsing. An implementation which chooses not to check required fields |
| 4526 | /// must be consistent about it. That is, for any particular sub-message, the |
| 4527 | /// implementation must either *always* check its required fields, or *never* |
| 4528 | /// check its required fields, regardless of whether or not the message has |
| 4529 | /// been parsed. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4530 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4531 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4532 | public bool Lazy { |
| 4533 | get { return lazy_; } |
| 4534 | set { |
| 4535 | lazy_ = value; |
| 4536 | } |
| 4537 | } |
| 4538 | |
| 4539 | /// <summary>Field number for the "deprecated" field.</summary> |
| 4540 | public const int DeprecatedFieldNumber = 3; |
| 4541 | private bool deprecated_; |
| 4542 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4543 | /// Is this field deprecated? |
| 4544 | /// Depending on the target platform, this can emit Deprecated annotations |
| 4545 | /// for accessors, or it will be completely ignored; in the very least, this |
| 4546 | /// is a formalization for deprecating fields. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4547 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4548 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4549 | public bool Deprecated { |
| 4550 | get { return deprecated_; } |
| 4551 | set { |
| 4552 | deprecated_ = value; |
| 4553 | } |
| 4554 | } |
| 4555 | |
| 4556 | /// <summary>Field number for the "weak" field.</summary> |
| 4557 | public const int WeakFieldNumber = 10; |
| 4558 | private bool weak_; |
| 4559 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4560 | /// For Google-internal migration only. Do not use. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4561 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4562 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4563 | public bool Weak { |
| 4564 | get { return weak_; } |
| 4565 | set { |
| 4566 | weak_ = value; |
| 4567 | } |
| 4568 | } |
| 4569 | |
| 4570 | /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 4571 | public const int UninterpretedOptionFieldNumber = 999; |
| 4572 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec |
| 4573 | = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); |
| 4574 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); |
| 4575 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4576 | /// The parser stores options it doesn't recognize here. See above. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4577 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4578 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4579 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { |
| 4580 | get { return uninterpretedOption_; } |
| 4581 | } |
| 4582 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4583 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4584 | public override bool Equals(object other) { |
| 4585 | return Equals(other as FieldOptions); |
| 4586 | } |
| 4587 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4588 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4589 | public bool Equals(FieldOptions other) { |
| 4590 | if (ReferenceEquals(other, null)) { |
| 4591 | return false; |
| 4592 | } |
| 4593 | if (ReferenceEquals(other, this)) { |
| 4594 | return true; |
| 4595 | } |
| 4596 | if (Ctype != other.Ctype) return false; |
| 4597 | if (Packed != other.Packed) return false; |
| 4598 | if (Jstype != other.Jstype) return false; |
| 4599 | if (Lazy != other.Lazy) return false; |
| 4600 | if (Deprecated != other.Deprecated) return false; |
| 4601 | if (Weak != other.Weak) return false; |
| 4602 | if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4603 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4604 | } |
| 4605 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4606 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4607 | public override int GetHashCode() { |
| 4608 | int hash = 1; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4609 | if (Ctype != 0) hash ^= Ctype.GetHashCode(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4610 | if (Packed != false) hash ^= Packed.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4611 | if (Jstype != 0) hash ^= Jstype.GetHashCode(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4612 | if (Lazy != false) hash ^= Lazy.GetHashCode(); |
| 4613 | if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 4614 | if (Weak != false) hash ^= Weak.GetHashCode(); |
| 4615 | hash ^= uninterpretedOption_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4616 | if (_unknownFields != null) { |
| 4617 | hash ^= _unknownFields.GetHashCode(); |
| 4618 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4619 | return hash; |
| 4620 | } |
| 4621 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4622 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4623 | public override string ToString() { |
| 4624 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 4625 | } |
| 4626 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4627 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4628 | public void WriteTo(pb::CodedOutputStream output) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4629 | if (Ctype != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4630 | output.WriteRawTag(8); |
| 4631 | output.WriteEnum((int) Ctype); |
| 4632 | } |
| 4633 | if (Packed != false) { |
| 4634 | output.WriteRawTag(16); |
| 4635 | output.WriteBool(Packed); |
| 4636 | } |
| 4637 | if (Deprecated != false) { |
| 4638 | output.WriteRawTag(24); |
| 4639 | output.WriteBool(Deprecated); |
| 4640 | } |
| 4641 | if (Lazy != false) { |
| 4642 | output.WriteRawTag(40); |
| 4643 | output.WriteBool(Lazy); |
| 4644 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4645 | if (Jstype != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4646 | output.WriteRawTag(48); |
| 4647 | output.WriteEnum((int) Jstype); |
| 4648 | } |
| 4649 | if (Weak != false) { |
| 4650 | output.WriteRawTag(80); |
| 4651 | output.WriteBool(Weak); |
| 4652 | } |
| 4653 | uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4654 | if (_unknownFields != null) { |
| 4655 | _unknownFields.WriteTo(output); |
| 4656 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4657 | } |
| 4658 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4659 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4660 | public int CalculateSize() { |
| 4661 | int size = 0; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4662 | if (Ctype != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4663 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Ctype); |
| 4664 | } |
| 4665 | if (Packed != false) { |
| 4666 | size += 1 + 1; |
| 4667 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4668 | if (Jstype != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4669 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Jstype); |
| 4670 | } |
| 4671 | if (Lazy != false) { |
| 4672 | size += 1 + 1; |
| 4673 | } |
| 4674 | if (Deprecated != false) { |
| 4675 | size += 1 + 1; |
| 4676 | } |
| 4677 | if (Weak != false) { |
| 4678 | size += 1 + 1; |
| 4679 | } |
| 4680 | size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4681 | if (_unknownFields != null) { |
| 4682 | size += _unknownFields.CalculateSize(); |
| 4683 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4684 | return size; |
| 4685 | } |
| 4686 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4687 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4688 | public void MergeFrom(FieldOptions other) { |
| 4689 | if (other == null) { |
| 4690 | return; |
| 4691 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4692 | if (other.Ctype != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4693 | Ctype = other.Ctype; |
| 4694 | } |
| 4695 | if (other.Packed != false) { |
| 4696 | Packed = other.Packed; |
| 4697 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4698 | if (other.Jstype != 0) { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4699 | Jstype = other.Jstype; |
| 4700 | } |
| 4701 | if (other.Lazy != false) { |
| 4702 | Lazy = other.Lazy; |
| 4703 | } |
| 4704 | if (other.Deprecated != false) { |
| 4705 | Deprecated = other.Deprecated; |
| 4706 | } |
| 4707 | if (other.Weak != false) { |
| 4708 | Weak = other.Weak; |
| 4709 | } |
| 4710 | uninterpretedOption_.Add(other.uninterpretedOption_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4711 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4712 | } |
| 4713 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4714 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4715 | public void MergeFrom(pb::CodedInputStream input) { |
| 4716 | uint tag; |
| 4717 | while ((tag = input.ReadTag()) != 0) { |
| 4718 | switch(tag) { |
| 4719 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4720 | CustomOptions = CustomOptions.ReadOrSkipUnknownField(input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4721 | break; |
| 4722 | case 8: { |
| 4723 | ctype_ = (global::Google.Protobuf.Reflection.FieldOptions.Types.CType) input.ReadEnum(); |
| 4724 | break; |
| 4725 | } |
| 4726 | case 16: { |
| 4727 | Packed = input.ReadBool(); |
| 4728 | break; |
| 4729 | } |
| 4730 | case 24: { |
| 4731 | Deprecated = input.ReadBool(); |
| 4732 | break; |
| 4733 | } |
| 4734 | case 40: { |
| 4735 | Lazy = input.ReadBool(); |
| 4736 | break; |
| 4737 | } |
| 4738 | case 48: { |
| 4739 | jstype_ = (global::Google.Protobuf.Reflection.FieldOptions.Types.JSType) input.ReadEnum(); |
| 4740 | break; |
| 4741 | } |
| 4742 | case 80: { |
| 4743 | Weak = input.ReadBool(); |
| 4744 | break; |
| 4745 | } |
| 4746 | case 7994: { |
| 4747 | uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec); |
| 4748 | break; |
| 4749 | } |
| 4750 | } |
| 4751 | } |
| 4752 | } |
| 4753 | |
| 4754 | #region Nested types |
| 4755 | /// <summary>Container for nested types declared in the FieldOptions message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4756 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4757 | public static partial class Types { |
| 4758 | internal enum CType { |
| 4759 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4760 | /// Default mode. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4761 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4762 | [pbr::OriginalName("STRING")] String = 0, |
| 4763 | [pbr::OriginalName("CORD")] Cord = 1, |
| 4764 | [pbr::OriginalName("STRING_PIECE")] StringPiece = 2, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4765 | } |
| 4766 | |
| 4767 | internal enum JSType { |
| 4768 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4769 | /// Use the default type. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4770 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4771 | [pbr::OriginalName("JS_NORMAL")] JsNormal = 0, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4772 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4773 | /// Use JavaScript strings. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4774 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4775 | [pbr::OriginalName("JS_STRING")] JsString = 1, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4776 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4777 | /// Use JavaScript numbers. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4778 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4779 | [pbr::OriginalName("JS_NUMBER")] JsNumber = 2, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4780 | } |
| 4781 | |
| 4782 | } |
| 4783 | #endregion |
| 4784 | |
| 4785 | } |
| 4786 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4787 | internal sealed partial class OneofOptions : pb::IMessage<OneofOptions> { |
| 4788 | private static readonly pb::MessageParser<OneofOptions> _parser = new pb::MessageParser<OneofOptions>(() => new OneofOptions()); |
| 4789 | private pb::UnknownFieldSet _unknownFields; |
| 4790 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4791 | public static pb::MessageParser<OneofOptions> Parser { get { return _parser; } } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4792 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4793 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4794 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4795 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[13]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4796 | } |
| 4797 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4798 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4799 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4800 | get { return Descriptor; } |
| 4801 | } |
| 4802 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4803 | internal CustomOptions CustomOptions{ get; private set; } = CustomOptions.Empty; |
| 4804 | |
| 4805 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4806 | public OneofOptions() { |
| 4807 | OnConstruction(); |
| 4808 | } |
| 4809 | |
| 4810 | partial void OnConstruction(); |
| 4811 | |
| 4812 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4813 | public OneofOptions(OneofOptions other) : this() { |
| 4814 | uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
| 4815 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
| 4816 | } |
| 4817 | |
| 4818 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4819 | public OneofOptions Clone() { |
| 4820 | return new OneofOptions(this); |
| 4821 | } |
| 4822 | |
| 4823 | /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 4824 | public const int UninterpretedOptionFieldNumber = 999; |
| 4825 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec |
| 4826 | = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); |
| 4827 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); |
| 4828 | /// <summary> |
| 4829 | /// The parser stores options it doesn't recognize here. See above. |
| 4830 | /// </summary> |
| 4831 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4832 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { |
| 4833 | get { return uninterpretedOption_; } |
| 4834 | } |
| 4835 | |
| 4836 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4837 | public override bool Equals(object other) { |
| 4838 | return Equals(other as OneofOptions); |
| 4839 | } |
| 4840 | |
| 4841 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4842 | public bool Equals(OneofOptions other) { |
| 4843 | if (ReferenceEquals(other, null)) { |
| 4844 | return false; |
| 4845 | } |
| 4846 | if (ReferenceEquals(other, this)) { |
| 4847 | return true; |
| 4848 | } |
| 4849 | if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
| 4850 | return Equals(_unknownFields, other._unknownFields); |
| 4851 | } |
| 4852 | |
| 4853 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4854 | public override int GetHashCode() { |
| 4855 | int hash = 1; |
| 4856 | hash ^= uninterpretedOption_.GetHashCode(); |
| 4857 | if (_unknownFields != null) { |
| 4858 | hash ^= _unknownFields.GetHashCode(); |
| 4859 | } |
| 4860 | return hash; |
| 4861 | } |
| 4862 | |
| 4863 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4864 | public override string ToString() { |
| 4865 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 4866 | } |
| 4867 | |
| 4868 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4869 | public void WriteTo(pb::CodedOutputStream output) { |
| 4870 | uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
| 4871 | if (_unknownFields != null) { |
| 4872 | _unknownFields.WriteTo(output); |
| 4873 | } |
| 4874 | } |
| 4875 | |
| 4876 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4877 | public int CalculateSize() { |
| 4878 | int size = 0; |
| 4879 | size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); |
| 4880 | if (_unknownFields != null) { |
| 4881 | size += _unknownFields.CalculateSize(); |
| 4882 | } |
| 4883 | return size; |
| 4884 | } |
| 4885 | |
| 4886 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4887 | public void MergeFrom(OneofOptions other) { |
| 4888 | if (other == null) { |
| 4889 | return; |
| 4890 | } |
| 4891 | uninterpretedOption_.Add(other.uninterpretedOption_); |
| 4892 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
| 4893 | } |
| 4894 | |
| 4895 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4896 | public void MergeFrom(pb::CodedInputStream input) { |
| 4897 | uint tag; |
| 4898 | while ((tag = input.ReadTag()) != 0) { |
| 4899 | switch(tag) { |
| 4900 | default: |
| 4901 | CustomOptions = CustomOptions.ReadOrSkipUnknownField(input); |
| 4902 | break; |
| 4903 | case 7994: { |
| 4904 | uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec); |
| 4905 | break; |
| 4906 | } |
| 4907 | } |
| 4908 | } |
| 4909 | } |
| 4910 | |
| 4911 | } |
| 4912 | |
| 4913 | internal sealed partial class EnumOptions : pb::IMessage<EnumOptions> { |
| 4914 | private static readonly pb::MessageParser<EnumOptions> _parser = new pb::MessageParser<EnumOptions>(() => new EnumOptions()); |
| 4915 | private pb::UnknownFieldSet _unknownFields; |
| 4916 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4917 | public static pb::MessageParser<EnumOptions> Parser { get { return _parser; } } |
| 4918 | |
| 4919 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4920 | public static pbr::MessageDescriptor Descriptor { |
| 4921 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[14]; } |
| 4922 | } |
| 4923 | |
| 4924 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 4925 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4926 | get { return Descriptor; } |
| 4927 | } |
| 4928 | |
| 4929 | internal CustomOptions CustomOptions{ get; private set; } = CustomOptions.Empty; |
| 4930 | |
| 4931 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4932 | public EnumOptions() { |
| 4933 | OnConstruction(); |
| 4934 | } |
| 4935 | |
| 4936 | partial void OnConstruction(); |
| 4937 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4938 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4939 | public EnumOptions(EnumOptions other) : this() { |
| 4940 | allowAlias_ = other.allowAlias_; |
| 4941 | deprecated_ = other.deprecated_; |
| 4942 | uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4943 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4944 | } |
| 4945 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4946 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4947 | public EnumOptions Clone() { |
| 4948 | return new EnumOptions(this); |
| 4949 | } |
| 4950 | |
| 4951 | /// <summary>Field number for the "allow_alias" field.</summary> |
| 4952 | public const int AllowAliasFieldNumber = 2; |
| 4953 | private bool allowAlias_; |
| 4954 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4955 | /// Set this option to true to allow mapping different tag names to the same |
| 4956 | /// value. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4957 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4958 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4959 | public bool AllowAlias { |
| 4960 | get { return allowAlias_; } |
| 4961 | set { |
| 4962 | allowAlias_ = value; |
| 4963 | } |
| 4964 | } |
| 4965 | |
| 4966 | /// <summary>Field number for the "deprecated" field.</summary> |
| 4967 | public const int DeprecatedFieldNumber = 3; |
| 4968 | private bool deprecated_; |
| 4969 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4970 | /// Is this enum deprecated? |
| 4971 | /// Depending on the target platform, this can emit Deprecated annotations |
| 4972 | /// for the enum, or it will be completely ignored; in the very least, this |
| 4973 | /// is a formalization for deprecating enums. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4974 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4975 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4976 | public bool Deprecated { |
| 4977 | get { return deprecated_; } |
| 4978 | set { |
| 4979 | deprecated_ = value; |
| 4980 | } |
| 4981 | } |
| 4982 | |
| 4983 | /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 4984 | public const int UninterpretedOptionFieldNumber = 999; |
| 4985 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec |
| 4986 | = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); |
| 4987 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); |
| 4988 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4989 | /// The parser stores options it doesn't recognize here. See above. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4990 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4991 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4992 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { |
| 4993 | get { return uninterpretedOption_; } |
| 4994 | } |
| 4995 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4996 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 4997 | public override bool Equals(object other) { |
| 4998 | return Equals(other as EnumOptions); |
| 4999 | } |
| 5000 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5001 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5002 | public bool Equals(EnumOptions other) { |
| 5003 | if (ReferenceEquals(other, null)) { |
| 5004 | return false; |
| 5005 | } |
| 5006 | if (ReferenceEquals(other, this)) { |
| 5007 | return true; |
| 5008 | } |
| 5009 | if (AllowAlias != other.AllowAlias) return false; |
| 5010 | if (Deprecated != other.Deprecated) return false; |
| 5011 | if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5012 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5013 | } |
| 5014 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5015 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5016 | public override int GetHashCode() { |
| 5017 | int hash = 1; |
| 5018 | if (AllowAlias != false) hash ^= AllowAlias.GetHashCode(); |
| 5019 | if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 5020 | hash ^= uninterpretedOption_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5021 | if (_unknownFields != null) { |
| 5022 | hash ^= _unknownFields.GetHashCode(); |
| 5023 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5024 | return hash; |
| 5025 | } |
| 5026 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5027 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5028 | public override string ToString() { |
| 5029 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 5030 | } |
| 5031 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5032 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5033 | public void WriteTo(pb::CodedOutputStream output) { |
| 5034 | if (AllowAlias != false) { |
| 5035 | output.WriteRawTag(16); |
| 5036 | output.WriteBool(AllowAlias); |
| 5037 | } |
| 5038 | if (Deprecated != false) { |
| 5039 | output.WriteRawTag(24); |
| 5040 | output.WriteBool(Deprecated); |
| 5041 | } |
| 5042 | uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5043 | if (_unknownFields != null) { |
| 5044 | _unknownFields.WriteTo(output); |
| 5045 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5046 | } |
| 5047 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5048 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5049 | public int CalculateSize() { |
| 5050 | int size = 0; |
| 5051 | if (AllowAlias != false) { |
| 5052 | size += 1 + 1; |
| 5053 | } |
| 5054 | if (Deprecated != false) { |
| 5055 | size += 1 + 1; |
| 5056 | } |
| 5057 | size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5058 | if (_unknownFields != null) { |
| 5059 | size += _unknownFields.CalculateSize(); |
| 5060 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5061 | return size; |
| 5062 | } |
| 5063 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5064 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5065 | public void MergeFrom(EnumOptions other) { |
| 5066 | if (other == null) { |
| 5067 | return; |
| 5068 | } |
| 5069 | if (other.AllowAlias != false) { |
| 5070 | AllowAlias = other.AllowAlias; |
| 5071 | } |
| 5072 | if (other.Deprecated != false) { |
| 5073 | Deprecated = other.Deprecated; |
| 5074 | } |
| 5075 | uninterpretedOption_.Add(other.uninterpretedOption_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5076 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5077 | } |
| 5078 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5079 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5080 | public void MergeFrom(pb::CodedInputStream input) { |
| 5081 | uint tag; |
| 5082 | while ((tag = input.ReadTag()) != 0) { |
| 5083 | switch(tag) { |
| 5084 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5085 | CustomOptions = CustomOptions.ReadOrSkipUnknownField(input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5086 | break; |
| 5087 | case 16: { |
| 5088 | AllowAlias = input.ReadBool(); |
| 5089 | break; |
| 5090 | } |
| 5091 | case 24: { |
| 5092 | Deprecated = input.ReadBool(); |
| 5093 | break; |
| 5094 | } |
| 5095 | case 7994: { |
| 5096 | uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec); |
| 5097 | break; |
| 5098 | } |
| 5099 | } |
| 5100 | } |
| 5101 | } |
| 5102 | |
| 5103 | } |
| 5104 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5105 | internal sealed partial class EnumValueOptions : pb::IMessage<EnumValueOptions> { |
| 5106 | private static readonly pb::MessageParser<EnumValueOptions> _parser = new pb::MessageParser<EnumValueOptions>(() => new EnumValueOptions()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5107 | private pb::UnknownFieldSet _unknownFields; |
| 5108 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5109 | public static pb::MessageParser<EnumValueOptions> Parser { get { return _parser; } } |
| 5110 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5111 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5112 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5113 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[15]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5114 | } |
| 5115 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5116 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5117 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5118 | get { return Descriptor; } |
| 5119 | } |
| 5120 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5121 | internal CustomOptions CustomOptions{ get; private set; } = CustomOptions.Empty; |
| 5122 | |
| 5123 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5124 | public EnumValueOptions() { |
| 5125 | OnConstruction(); |
| 5126 | } |
| 5127 | |
| 5128 | partial void OnConstruction(); |
| 5129 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5130 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5131 | public EnumValueOptions(EnumValueOptions other) : this() { |
| 5132 | deprecated_ = other.deprecated_; |
| 5133 | uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5134 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5135 | } |
| 5136 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5137 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5138 | public EnumValueOptions Clone() { |
| 5139 | return new EnumValueOptions(this); |
| 5140 | } |
| 5141 | |
| 5142 | /// <summary>Field number for the "deprecated" field.</summary> |
| 5143 | public const int DeprecatedFieldNumber = 1; |
| 5144 | private bool deprecated_; |
| 5145 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5146 | /// Is this enum value deprecated? |
| 5147 | /// Depending on the target platform, this can emit Deprecated annotations |
| 5148 | /// for the enum value, or it will be completely ignored; in the very least, |
| 5149 | /// this is a formalization for deprecating enum values. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5150 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5151 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5152 | public bool Deprecated { |
| 5153 | get { return deprecated_; } |
| 5154 | set { |
| 5155 | deprecated_ = value; |
| 5156 | } |
| 5157 | } |
| 5158 | |
| 5159 | /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 5160 | public const int UninterpretedOptionFieldNumber = 999; |
| 5161 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec |
| 5162 | = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); |
| 5163 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); |
| 5164 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5165 | /// The parser stores options it doesn't recognize here. See above. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5166 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5167 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5168 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { |
| 5169 | get { return uninterpretedOption_; } |
| 5170 | } |
| 5171 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5172 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5173 | public override bool Equals(object other) { |
| 5174 | return Equals(other as EnumValueOptions); |
| 5175 | } |
| 5176 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5177 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5178 | public bool Equals(EnumValueOptions other) { |
| 5179 | if (ReferenceEquals(other, null)) { |
| 5180 | return false; |
| 5181 | } |
| 5182 | if (ReferenceEquals(other, this)) { |
| 5183 | return true; |
| 5184 | } |
| 5185 | if (Deprecated != other.Deprecated) return false; |
| 5186 | if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5187 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5188 | } |
| 5189 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5190 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5191 | public override int GetHashCode() { |
| 5192 | int hash = 1; |
| 5193 | if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 5194 | hash ^= uninterpretedOption_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5195 | if (_unknownFields != null) { |
| 5196 | hash ^= _unknownFields.GetHashCode(); |
| 5197 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5198 | return hash; |
| 5199 | } |
| 5200 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5201 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5202 | public override string ToString() { |
| 5203 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 5204 | } |
| 5205 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5206 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5207 | public void WriteTo(pb::CodedOutputStream output) { |
| 5208 | if (Deprecated != false) { |
| 5209 | output.WriteRawTag(8); |
| 5210 | output.WriteBool(Deprecated); |
| 5211 | } |
| 5212 | uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5213 | if (_unknownFields != null) { |
| 5214 | _unknownFields.WriteTo(output); |
| 5215 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5216 | } |
| 5217 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5218 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5219 | public int CalculateSize() { |
| 5220 | int size = 0; |
| 5221 | if (Deprecated != false) { |
| 5222 | size += 1 + 1; |
| 5223 | } |
| 5224 | size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5225 | if (_unknownFields != null) { |
| 5226 | size += _unknownFields.CalculateSize(); |
| 5227 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5228 | return size; |
| 5229 | } |
| 5230 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5231 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5232 | public void MergeFrom(EnumValueOptions other) { |
| 5233 | if (other == null) { |
| 5234 | return; |
| 5235 | } |
| 5236 | if (other.Deprecated != false) { |
| 5237 | Deprecated = other.Deprecated; |
| 5238 | } |
| 5239 | uninterpretedOption_.Add(other.uninterpretedOption_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5240 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5241 | } |
| 5242 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5243 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5244 | public void MergeFrom(pb::CodedInputStream input) { |
| 5245 | uint tag; |
| 5246 | while ((tag = input.ReadTag()) != 0) { |
| 5247 | switch(tag) { |
| 5248 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5249 | CustomOptions = CustomOptions.ReadOrSkipUnknownField(input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5250 | break; |
| 5251 | case 8: { |
| 5252 | Deprecated = input.ReadBool(); |
| 5253 | break; |
| 5254 | } |
| 5255 | case 7994: { |
| 5256 | uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec); |
| 5257 | break; |
| 5258 | } |
| 5259 | } |
| 5260 | } |
| 5261 | } |
| 5262 | |
| 5263 | } |
| 5264 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5265 | internal sealed partial class ServiceOptions : pb::IMessage<ServiceOptions> { |
| 5266 | private static readonly pb::MessageParser<ServiceOptions> _parser = new pb::MessageParser<ServiceOptions>(() => new ServiceOptions()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5267 | private pb::UnknownFieldSet _unknownFields; |
| 5268 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5269 | public static pb::MessageParser<ServiceOptions> Parser { get { return _parser; } } |
| 5270 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5271 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5272 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5273 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[16]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5274 | } |
| 5275 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5276 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5277 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5278 | get { return Descriptor; } |
| 5279 | } |
| 5280 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5281 | internal CustomOptions CustomOptions{ get; private set; } = CustomOptions.Empty; |
| 5282 | |
| 5283 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5284 | public ServiceOptions() { |
| 5285 | OnConstruction(); |
| 5286 | } |
| 5287 | |
| 5288 | partial void OnConstruction(); |
| 5289 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5290 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5291 | public ServiceOptions(ServiceOptions other) : this() { |
| 5292 | deprecated_ = other.deprecated_; |
| 5293 | uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5294 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5295 | } |
| 5296 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5297 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5298 | public ServiceOptions Clone() { |
| 5299 | return new ServiceOptions(this); |
| 5300 | } |
| 5301 | |
| 5302 | /// <summary>Field number for the "deprecated" field.</summary> |
| 5303 | public const int DeprecatedFieldNumber = 33; |
| 5304 | private bool deprecated_; |
| 5305 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5306 | /// Is this service deprecated? |
| 5307 | /// Depending on the target platform, this can emit Deprecated annotations |
| 5308 | /// for the service, or it will be completely ignored; in the very least, |
| 5309 | /// this is a formalization for deprecating services. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5310 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5311 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5312 | public bool Deprecated { |
| 5313 | get { return deprecated_; } |
| 5314 | set { |
| 5315 | deprecated_ = value; |
| 5316 | } |
| 5317 | } |
| 5318 | |
| 5319 | /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 5320 | public const int UninterpretedOptionFieldNumber = 999; |
| 5321 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec |
| 5322 | = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); |
| 5323 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); |
| 5324 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5325 | /// The parser stores options it doesn't recognize here. See above. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5326 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5327 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5328 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { |
| 5329 | get { return uninterpretedOption_; } |
| 5330 | } |
| 5331 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5332 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5333 | public override bool Equals(object other) { |
| 5334 | return Equals(other as ServiceOptions); |
| 5335 | } |
| 5336 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5337 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5338 | public bool Equals(ServiceOptions other) { |
| 5339 | if (ReferenceEquals(other, null)) { |
| 5340 | return false; |
| 5341 | } |
| 5342 | if (ReferenceEquals(other, this)) { |
| 5343 | return true; |
| 5344 | } |
| 5345 | if (Deprecated != other.Deprecated) return false; |
| 5346 | if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5347 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5348 | } |
| 5349 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5350 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5351 | public override int GetHashCode() { |
| 5352 | int hash = 1; |
| 5353 | if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 5354 | hash ^= uninterpretedOption_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5355 | if (_unknownFields != null) { |
| 5356 | hash ^= _unknownFields.GetHashCode(); |
| 5357 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5358 | return hash; |
| 5359 | } |
| 5360 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5361 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5362 | public override string ToString() { |
| 5363 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 5364 | } |
| 5365 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5366 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5367 | public void WriteTo(pb::CodedOutputStream output) { |
| 5368 | if (Deprecated != false) { |
| 5369 | output.WriteRawTag(136, 2); |
| 5370 | output.WriteBool(Deprecated); |
| 5371 | } |
| 5372 | uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5373 | if (_unknownFields != null) { |
| 5374 | _unknownFields.WriteTo(output); |
| 5375 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5376 | } |
| 5377 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5378 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5379 | public int CalculateSize() { |
| 5380 | int size = 0; |
| 5381 | if (Deprecated != false) { |
| 5382 | size += 2 + 1; |
| 5383 | } |
| 5384 | size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5385 | if (_unknownFields != null) { |
| 5386 | size += _unknownFields.CalculateSize(); |
| 5387 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5388 | return size; |
| 5389 | } |
| 5390 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5391 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5392 | public void MergeFrom(ServiceOptions other) { |
| 5393 | if (other == null) { |
| 5394 | return; |
| 5395 | } |
| 5396 | if (other.Deprecated != false) { |
| 5397 | Deprecated = other.Deprecated; |
| 5398 | } |
| 5399 | uninterpretedOption_.Add(other.uninterpretedOption_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5400 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5401 | } |
| 5402 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5403 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5404 | public void MergeFrom(pb::CodedInputStream input) { |
| 5405 | uint tag; |
| 5406 | while ((tag = input.ReadTag()) != 0) { |
| 5407 | switch(tag) { |
| 5408 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5409 | CustomOptions = CustomOptions.ReadOrSkipUnknownField(input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5410 | break; |
| 5411 | case 264: { |
| 5412 | Deprecated = input.ReadBool(); |
| 5413 | break; |
| 5414 | } |
| 5415 | case 7994: { |
| 5416 | uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec); |
| 5417 | break; |
| 5418 | } |
| 5419 | } |
| 5420 | } |
| 5421 | } |
| 5422 | |
| 5423 | } |
| 5424 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5425 | internal sealed partial class MethodOptions : pb::IMessage<MethodOptions> { |
| 5426 | private static readonly pb::MessageParser<MethodOptions> _parser = new pb::MessageParser<MethodOptions>(() => new MethodOptions()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5427 | private pb::UnknownFieldSet _unknownFields; |
| 5428 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5429 | public static pb::MessageParser<MethodOptions> Parser { get { return _parser; } } |
| 5430 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5431 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5432 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5433 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[17]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5434 | } |
| 5435 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5436 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5437 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5438 | get { return Descriptor; } |
| 5439 | } |
| 5440 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5441 | internal CustomOptions CustomOptions{ get; private set; } = CustomOptions.Empty; |
| 5442 | |
| 5443 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5444 | public MethodOptions() { |
| 5445 | OnConstruction(); |
| 5446 | } |
| 5447 | |
| 5448 | partial void OnConstruction(); |
| 5449 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5450 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5451 | public MethodOptions(MethodOptions other) : this() { |
| 5452 | deprecated_ = other.deprecated_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5453 | idempotencyLevel_ = other.idempotencyLevel_; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5454 | uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5455 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5456 | } |
| 5457 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5458 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5459 | public MethodOptions Clone() { |
| 5460 | return new MethodOptions(this); |
| 5461 | } |
| 5462 | |
| 5463 | /// <summary>Field number for the "deprecated" field.</summary> |
| 5464 | public const int DeprecatedFieldNumber = 33; |
| 5465 | private bool deprecated_; |
| 5466 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5467 | /// Is this method deprecated? |
| 5468 | /// Depending on the target platform, this can emit Deprecated annotations |
| 5469 | /// for the method, or it will be completely ignored; in the very least, |
| 5470 | /// this is a formalization for deprecating methods. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5471 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5472 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5473 | public bool Deprecated { |
| 5474 | get { return deprecated_; } |
| 5475 | set { |
| 5476 | deprecated_ = value; |
| 5477 | } |
| 5478 | } |
| 5479 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5480 | /// <summary>Field number for the "idempotency_level" field.</summary> |
| 5481 | public const int IdempotencyLevelFieldNumber = 34; |
| 5482 | private global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel idempotencyLevel_ = 0; |
| 5483 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 5484 | public global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel IdempotencyLevel { |
| 5485 | get { return idempotencyLevel_; } |
| 5486 | set { |
| 5487 | idempotencyLevel_ = value; |
| 5488 | } |
| 5489 | } |
| 5490 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5491 | /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 5492 | public const int UninterpretedOptionFieldNumber = 999; |
| 5493 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption> _repeated_uninterpretedOption_codec |
| 5494 | = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); |
| 5495 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption>(); |
| 5496 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5497 | /// The parser stores options it doesn't recognize here. See above. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5498 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5499 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5500 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption> UninterpretedOption { |
| 5501 | get { return uninterpretedOption_; } |
| 5502 | } |
| 5503 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5504 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5505 | public override bool Equals(object other) { |
| 5506 | return Equals(other as MethodOptions); |
| 5507 | } |
| 5508 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5509 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5510 | public bool Equals(MethodOptions other) { |
| 5511 | if (ReferenceEquals(other, null)) { |
| 5512 | return false; |
| 5513 | } |
| 5514 | if (ReferenceEquals(other, this)) { |
| 5515 | return true; |
| 5516 | } |
| 5517 | if (Deprecated != other.Deprecated) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5518 | if (IdempotencyLevel != other.IdempotencyLevel) return false; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5519 | if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5520 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5521 | } |
| 5522 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5523 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5524 | public override int GetHashCode() { |
| 5525 | int hash = 1; |
| 5526 | if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5527 | if (IdempotencyLevel != 0) hash ^= IdempotencyLevel.GetHashCode(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5528 | hash ^= uninterpretedOption_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5529 | if (_unknownFields != null) { |
| 5530 | hash ^= _unknownFields.GetHashCode(); |
| 5531 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5532 | return hash; |
| 5533 | } |
| 5534 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5535 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5536 | public override string ToString() { |
| 5537 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 5538 | } |
| 5539 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5540 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5541 | public void WriteTo(pb::CodedOutputStream output) { |
| 5542 | if (Deprecated != false) { |
| 5543 | output.WriteRawTag(136, 2); |
| 5544 | output.WriteBool(Deprecated); |
| 5545 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5546 | if (IdempotencyLevel != 0) { |
| 5547 | output.WriteRawTag(144, 2); |
| 5548 | output.WriteEnum((int) IdempotencyLevel); |
| 5549 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5550 | uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5551 | if (_unknownFields != null) { |
| 5552 | _unknownFields.WriteTo(output); |
| 5553 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5554 | } |
| 5555 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5556 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5557 | public int CalculateSize() { |
| 5558 | int size = 0; |
| 5559 | if (Deprecated != false) { |
| 5560 | size += 2 + 1; |
| 5561 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5562 | if (IdempotencyLevel != 0) { |
| 5563 | size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) IdempotencyLevel); |
| 5564 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5565 | size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5566 | if (_unknownFields != null) { |
| 5567 | size += _unknownFields.CalculateSize(); |
| 5568 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5569 | return size; |
| 5570 | } |
| 5571 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5572 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5573 | public void MergeFrom(MethodOptions other) { |
| 5574 | if (other == null) { |
| 5575 | return; |
| 5576 | } |
| 5577 | if (other.Deprecated != false) { |
| 5578 | Deprecated = other.Deprecated; |
| 5579 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5580 | if (other.IdempotencyLevel != 0) { |
| 5581 | IdempotencyLevel = other.IdempotencyLevel; |
| 5582 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5583 | uninterpretedOption_.Add(other.uninterpretedOption_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5584 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5585 | } |
| 5586 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5587 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5588 | public void MergeFrom(pb::CodedInputStream input) { |
| 5589 | uint tag; |
| 5590 | while ((tag = input.ReadTag()) != 0) { |
| 5591 | switch(tag) { |
| 5592 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5593 | CustomOptions = CustomOptions.ReadOrSkipUnknownField(input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5594 | break; |
| 5595 | case 264: { |
| 5596 | Deprecated = input.ReadBool(); |
| 5597 | break; |
| 5598 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5599 | case 272: { |
| 5600 | idempotencyLevel_ = (global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel) input.ReadEnum(); |
| 5601 | break; |
| 5602 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5603 | case 7994: { |
| 5604 | uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_codec); |
| 5605 | break; |
| 5606 | } |
| 5607 | } |
| 5608 | } |
| 5609 | } |
| 5610 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5611 | #region Nested types |
| 5612 | /// <summary>Container for nested types declared in the MethodOptions message type.</summary> |
| 5613 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 5614 | public static partial class Types { |
| 5615 | /// <summary> |
| 5616 | /// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, |
| 5617 | /// or neither? HTTP based RPC implementation may choose GET verb for safe |
| 5618 | /// methods, and PUT verb for idempotent methods instead of the default POST. |
| 5619 | /// </summary> |
| 5620 | internal enum IdempotencyLevel { |
| 5621 | [pbr::OriginalName("IDEMPOTENCY_UNKNOWN")] IdempotencyUnknown = 0, |
| 5622 | /// <summary> |
| 5623 | /// implies idempotent |
| 5624 | /// </summary> |
| 5625 | [pbr::OriginalName("NO_SIDE_EFFECTS")] NoSideEffects = 1, |
| 5626 | /// <summary> |
| 5627 | /// idempotent, but may have side effects |
| 5628 | /// </summary> |
| 5629 | [pbr::OriginalName("IDEMPOTENT")] Idempotent = 2, |
| 5630 | } |
| 5631 | |
| 5632 | } |
| 5633 | #endregion |
| 5634 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5635 | } |
| 5636 | |
| 5637 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5638 | /// A message representing a option the parser does not recognize. This only |
| 5639 | /// appears in options protos created by the compiler::Parser class. |
| 5640 | /// DescriptorPool resolves these when building Descriptor objects. Therefore, |
| 5641 | /// options protos in descriptor objects (e.g. returned by Descriptor::options(), |
| 5642 | /// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions |
| 5643 | /// in them. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5644 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5645 | internal sealed partial class UninterpretedOption : pb::IMessage<UninterpretedOption> { |
| 5646 | private static readonly pb::MessageParser<UninterpretedOption> _parser = new pb::MessageParser<UninterpretedOption>(() => new UninterpretedOption()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5647 | private pb::UnknownFieldSet _unknownFields; |
| 5648 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5649 | public static pb::MessageParser<UninterpretedOption> Parser { get { return _parser; } } |
| 5650 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5651 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5652 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5653 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[18]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5654 | } |
| 5655 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5656 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5657 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5658 | get { return Descriptor; } |
| 5659 | } |
| 5660 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5661 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5662 | public UninterpretedOption() { |
| 5663 | OnConstruction(); |
| 5664 | } |
| 5665 | |
| 5666 | partial void OnConstruction(); |
| 5667 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5668 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5669 | public UninterpretedOption(UninterpretedOption other) : this() { |
| 5670 | name_ = other.name_.Clone(); |
| 5671 | identifierValue_ = other.identifierValue_; |
| 5672 | positiveIntValue_ = other.positiveIntValue_; |
| 5673 | negativeIntValue_ = other.negativeIntValue_; |
| 5674 | doubleValue_ = other.doubleValue_; |
| 5675 | stringValue_ = other.stringValue_; |
| 5676 | aggregateValue_ = other.aggregateValue_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5677 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5678 | } |
| 5679 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5680 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5681 | public UninterpretedOption Clone() { |
| 5682 | return new UninterpretedOption(this); |
| 5683 | } |
| 5684 | |
| 5685 | /// <summary>Field number for the "name" field.</summary> |
| 5686 | public const int NameFieldNumber = 2; |
| 5687 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart> _repeated_name_codec |
| 5688 | = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart.Parser); |
| 5689 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart> name_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5690 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5691 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart> Name { |
| 5692 | get { return name_; } |
| 5693 | } |
| 5694 | |
| 5695 | /// <summary>Field number for the "identifier_value" field.</summary> |
| 5696 | public const int IdentifierValueFieldNumber = 3; |
| 5697 | private string identifierValue_ = ""; |
| 5698 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5699 | /// The value of the uninterpreted option, in whatever type the tokenizer |
| 5700 | /// identified it as during parsing. Exactly one of these should be set. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5701 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5702 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5703 | public string IdentifierValue { |
| 5704 | get { return identifierValue_; } |
| 5705 | set { |
| 5706 | identifierValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 5707 | } |
| 5708 | } |
| 5709 | |
| 5710 | /// <summary>Field number for the "positive_int_value" field.</summary> |
| 5711 | public const int PositiveIntValueFieldNumber = 4; |
| 5712 | private ulong positiveIntValue_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5713 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5714 | public ulong PositiveIntValue { |
| 5715 | get { return positiveIntValue_; } |
| 5716 | set { |
| 5717 | positiveIntValue_ = value; |
| 5718 | } |
| 5719 | } |
| 5720 | |
| 5721 | /// <summary>Field number for the "negative_int_value" field.</summary> |
| 5722 | public const int NegativeIntValueFieldNumber = 5; |
| 5723 | private long negativeIntValue_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5724 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5725 | public long NegativeIntValue { |
| 5726 | get { return negativeIntValue_; } |
| 5727 | set { |
| 5728 | negativeIntValue_ = value; |
| 5729 | } |
| 5730 | } |
| 5731 | |
| 5732 | /// <summary>Field number for the "double_value" field.</summary> |
| 5733 | public const int DoubleValueFieldNumber = 6; |
| 5734 | private double doubleValue_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5735 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5736 | public double DoubleValue { |
| 5737 | get { return doubleValue_; } |
| 5738 | set { |
| 5739 | doubleValue_ = value; |
| 5740 | } |
| 5741 | } |
| 5742 | |
| 5743 | /// <summary>Field number for the "string_value" field.</summary> |
| 5744 | public const int StringValueFieldNumber = 7; |
| 5745 | private pb::ByteString stringValue_ = pb::ByteString.Empty; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5746 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5747 | public pb::ByteString StringValue { |
| 5748 | get { return stringValue_; } |
| 5749 | set { |
| 5750 | stringValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 5751 | } |
| 5752 | } |
| 5753 | |
| 5754 | /// <summary>Field number for the "aggregate_value" field.</summary> |
| 5755 | public const int AggregateValueFieldNumber = 8; |
| 5756 | private string aggregateValue_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5757 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5758 | public string AggregateValue { |
| 5759 | get { return aggregateValue_; } |
| 5760 | set { |
| 5761 | aggregateValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 5762 | } |
| 5763 | } |
| 5764 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5765 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5766 | public override bool Equals(object other) { |
| 5767 | return Equals(other as UninterpretedOption); |
| 5768 | } |
| 5769 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5770 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5771 | public bool Equals(UninterpretedOption other) { |
| 5772 | if (ReferenceEquals(other, null)) { |
| 5773 | return false; |
| 5774 | } |
| 5775 | if (ReferenceEquals(other, this)) { |
| 5776 | return true; |
| 5777 | } |
| 5778 | if(!name_.Equals(other.name_)) return false; |
| 5779 | if (IdentifierValue != other.IdentifierValue) return false; |
| 5780 | if (PositiveIntValue != other.PositiveIntValue) return false; |
| 5781 | if (NegativeIntValue != other.NegativeIntValue) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5782 | if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(DoubleValue, other.DoubleValue)) return false; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5783 | if (StringValue != other.StringValue) return false; |
| 5784 | if (AggregateValue != other.AggregateValue) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5785 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5786 | } |
| 5787 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5788 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5789 | public override int GetHashCode() { |
| 5790 | int hash = 1; |
| 5791 | hash ^= name_.GetHashCode(); |
| 5792 | if (IdentifierValue.Length != 0) hash ^= IdentifierValue.GetHashCode(); |
| 5793 | if (PositiveIntValue != 0UL) hash ^= PositiveIntValue.GetHashCode(); |
| 5794 | if (NegativeIntValue != 0L) hash ^= NegativeIntValue.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5795 | if (DoubleValue != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5796 | if (StringValue.Length != 0) hash ^= StringValue.GetHashCode(); |
| 5797 | if (AggregateValue.Length != 0) hash ^= AggregateValue.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5798 | if (_unknownFields != null) { |
| 5799 | hash ^= _unknownFields.GetHashCode(); |
| 5800 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5801 | return hash; |
| 5802 | } |
| 5803 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5804 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5805 | public override string ToString() { |
| 5806 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 5807 | } |
| 5808 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5809 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5810 | public void WriteTo(pb::CodedOutputStream output) { |
| 5811 | name_.WriteTo(output, _repeated_name_codec); |
| 5812 | if (IdentifierValue.Length != 0) { |
| 5813 | output.WriteRawTag(26); |
| 5814 | output.WriteString(IdentifierValue); |
| 5815 | } |
| 5816 | if (PositiveIntValue != 0UL) { |
| 5817 | output.WriteRawTag(32); |
| 5818 | output.WriteUInt64(PositiveIntValue); |
| 5819 | } |
| 5820 | if (NegativeIntValue != 0L) { |
| 5821 | output.WriteRawTag(40); |
| 5822 | output.WriteInt64(NegativeIntValue); |
| 5823 | } |
| 5824 | if (DoubleValue != 0D) { |
| 5825 | output.WriteRawTag(49); |
| 5826 | output.WriteDouble(DoubleValue); |
| 5827 | } |
| 5828 | if (StringValue.Length != 0) { |
| 5829 | output.WriteRawTag(58); |
| 5830 | output.WriteBytes(StringValue); |
| 5831 | } |
| 5832 | if (AggregateValue.Length != 0) { |
| 5833 | output.WriteRawTag(66); |
| 5834 | output.WriteString(AggregateValue); |
| 5835 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5836 | if (_unknownFields != null) { |
| 5837 | _unknownFields.WriteTo(output); |
| 5838 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5839 | } |
| 5840 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5841 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5842 | public int CalculateSize() { |
| 5843 | int size = 0; |
| 5844 | size += name_.CalculateSize(_repeated_name_codec); |
| 5845 | if (IdentifierValue.Length != 0) { |
| 5846 | size += 1 + pb::CodedOutputStream.ComputeStringSize(IdentifierValue); |
| 5847 | } |
| 5848 | if (PositiveIntValue != 0UL) { |
| 5849 | size += 1 + pb::CodedOutputStream.ComputeUInt64Size(PositiveIntValue); |
| 5850 | } |
| 5851 | if (NegativeIntValue != 0L) { |
| 5852 | size += 1 + pb::CodedOutputStream.ComputeInt64Size(NegativeIntValue); |
| 5853 | } |
| 5854 | if (DoubleValue != 0D) { |
| 5855 | size += 1 + 8; |
| 5856 | } |
| 5857 | if (StringValue.Length != 0) { |
| 5858 | size += 1 + pb::CodedOutputStream.ComputeBytesSize(StringValue); |
| 5859 | } |
| 5860 | if (AggregateValue.Length != 0) { |
| 5861 | size += 1 + pb::CodedOutputStream.ComputeStringSize(AggregateValue); |
| 5862 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5863 | if (_unknownFields != null) { |
| 5864 | size += _unknownFields.CalculateSize(); |
| 5865 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5866 | return size; |
| 5867 | } |
| 5868 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5869 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5870 | public void MergeFrom(UninterpretedOption other) { |
| 5871 | if (other == null) { |
| 5872 | return; |
| 5873 | } |
| 5874 | name_.Add(other.name_); |
| 5875 | if (other.IdentifierValue.Length != 0) { |
| 5876 | IdentifierValue = other.IdentifierValue; |
| 5877 | } |
| 5878 | if (other.PositiveIntValue != 0UL) { |
| 5879 | PositiveIntValue = other.PositiveIntValue; |
| 5880 | } |
| 5881 | if (other.NegativeIntValue != 0L) { |
| 5882 | NegativeIntValue = other.NegativeIntValue; |
| 5883 | } |
| 5884 | if (other.DoubleValue != 0D) { |
| 5885 | DoubleValue = other.DoubleValue; |
| 5886 | } |
| 5887 | if (other.StringValue.Length != 0) { |
| 5888 | StringValue = other.StringValue; |
| 5889 | } |
| 5890 | if (other.AggregateValue.Length != 0) { |
| 5891 | AggregateValue = other.AggregateValue; |
| 5892 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5893 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5894 | } |
| 5895 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5896 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5897 | public void MergeFrom(pb::CodedInputStream input) { |
| 5898 | uint tag; |
| 5899 | while ((tag = input.ReadTag()) != 0) { |
| 5900 | switch(tag) { |
| 5901 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5902 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5903 | break; |
| 5904 | case 18: { |
| 5905 | name_.AddEntriesFrom(input, _repeated_name_codec); |
| 5906 | break; |
| 5907 | } |
| 5908 | case 26: { |
| 5909 | IdentifierValue = input.ReadString(); |
| 5910 | break; |
| 5911 | } |
| 5912 | case 32: { |
| 5913 | PositiveIntValue = input.ReadUInt64(); |
| 5914 | break; |
| 5915 | } |
| 5916 | case 40: { |
| 5917 | NegativeIntValue = input.ReadInt64(); |
| 5918 | break; |
| 5919 | } |
| 5920 | case 49: { |
| 5921 | DoubleValue = input.ReadDouble(); |
| 5922 | break; |
| 5923 | } |
| 5924 | case 58: { |
| 5925 | StringValue = input.ReadBytes(); |
| 5926 | break; |
| 5927 | } |
| 5928 | case 66: { |
| 5929 | AggregateValue = input.ReadString(); |
| 5930 | break; |
| 5931 | } |
| 5932 | } |
| 5933 | } |
| 5934 | } |
| 5935 | |
| 5936 | #region Nested types |
| 5937 | /// <summary>Container for nested types declared in the UninterpretedOption message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5938 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5939 | public static partial class Types { |
| 5940 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5941 | /// The name of the uninterpreted option. Each string represents a segment in |
| 5942 | /// a dot-separated name. is_extension is true iff a segment represents an |
| 5943 | /// extension (denoted with parentheses in options specs in .proto files). |
| 5944 | /// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents |
| 5945 | /// "foo.(bar.baz).qux". |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5946 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5947 | internal sealed partial class NamePart : pb::IMessage<NamePart> { |
| 5948 | private static readonly pb::MessageParser<NamePart> _parser = new pb::MessageParser<NamePart>(() => new NamePart()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5949 | private pb::UnknownFieldSet _unknownFields; |
| 5950 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5951 | public static pb::MessageParser<NamePart> Parser { get { return _parser; } } |
| 5952 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5953 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5954 | public static pbr::MessageDescriptor Descriptor { |
| 5955 | get { return global::Google.Protobuf.Reflection.UninterpretedOption.Descriptor.NestedTypes[0]; } |
| 5956 | } |
| 5957 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5958 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5959 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5960 | get { return Descriptor; } |
| 5961 | } |
| 5962 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5963 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5964 | public NamePart() { |
| 5965 | OnConstruction(); |
| 5966 | } |
| 5967 | |
| 5968 | partial void OnConstruction(); |
| 5969 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5970 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5971 | public NamePart(NamePart other) : this() { |
| 5972 | namePart_ = other.namePart_; |
| 5973 | isExtension_ = other.isExtension_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5974 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5975 | } |
| 5976 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5977 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5978 | public NamePart Clone() { |
| 5979 | return new NamePart(this); |
| 5980 | } |
| 5981 | |
| 5982 | /// <summary>Field number for the "name_part" field.</summary> |
| 5983 | public const int NamePart_FieldNumber = 1; |
| 5984 | private string namePart_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5985 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5986 | public string NamePart_ { |
| 5987 | get { return namePart_; } |
| 5988 | set { |
| 5989 | namePart_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 5990 | } |
| 5991 | } |
| 5992 | |
| 5993 | /// <summary>Field number for the "is_extension" field.</summary> |
| 5994 | public const int IsExtensionFieldNumber = 2; |
| 5995 | private bool isExtension_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 5996 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 5997 | public bool IsExtension { |
| 5998 | get { return isExtension_; } |
| 5999 | set { |
| 6000 | isExtension_ = value; |
| 6001 | } |
| 6002 | } |
| 6003 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6004 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6005 | public override bool Equals(object other) { |
| 6006 | return Equals(other as NamePart); |
| 6007 | } |
| 6008 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6009 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6010 | public bool Equals(NamePart other) { |
| 6011 | if (ReferenceEquals(other, null)) { |
| 6012 | return false; |
| 6013 | } |
| 6014 | if (ReferenceEquals(other, this)) { |
| 6015 | return true; |
| 6016 | } |
| 6017 | if (NamePart_ != other.NamePart_) return false; |
| 6018 | if (IsExtension != other.IsExtension) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6019 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6020 | } |
| 6021 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6022 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6023 | public override int GetHashCode() { |
| 6024 | int hash = 1; |
| 6025 | if (NamePart_.Length != 0) hash ^= NamePart_.GetHashCode(); |
| 6026 | if (IsExtension != false) hash ^= IsExtension.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6027 | if (_unknownFields != null) { |
| 6028 | hash ^= _unknownFields.GetHashCode(); |
| 6029 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6030 | return hash; |
| 6031 | } |
| 6032 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6033 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6034 | public override string ToString() { |
| 6035 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6036 | } |
| 6037 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6038 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6039 | public void WriteTo(pb::CodedOutputStream output) { |
| 6040 | if (NamePart_.Length != 0) { |
| 6041 | output.WriteRawTag(10); |
| 6042 | output.WriteString(NamePart_); |
| 6043 | } |
| 6044 | if (IsExtension != false) { |
| 6045 | output.WriteRawTag(16); |
| 6046 | output.WriteBool(IsExtension); |
| 6047 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6048 | if (_unknownFields != null) { |
| 6049 | _unknownFields.WriteTo(output); |
| 6050 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6051 | } |
| 6052 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6053 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6054 | public int CalculateSize() { |
| 6055 | int size = 0; |
| 6056 | if (NamePart_.Length != 0) { |
| 6057 | size += 1 + pb::CodedOutputStream.ComputeStringSize(NamePart_); |
| 6058 | } |
| 6059 | if (IsExtension != false) { |
| 6060 | size += 1 + 1; |
| 6061 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6062 | if (_unknownFields != null) { |
| 6063 | size += _unknownFields.CalculateSize(); |
| 6064 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6065 | return size; |
| 6066 | } |
| 6067 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6068 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6069 | public void MergeFrom(NamePart other) { |
| 6070 | if (other == null) { |
| 6071 | return; |
| 6072 | } |
| 6073 | if (other.NamePart_.Length != 0) { |
| 6074 | NamePart_ = other.NamePart_; |
| 6075 | } |
| 6076 | if (other.IsExtension != false) { |
| 6077 | IsExtension = other.IsExtension; |
| 6078 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6079 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6080 | } |
| 6081 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6082 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6083 | public void MergeFrom(pb::CodedInputStream input) { |
| 6084 | uint tag; |
| 6085 | while ((tag = input.ReadTag()) != 0) { |
| 6086 | switch(tag) { |
| 6087 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6088 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6089 | break; |
| 6090 | case 10: { |
| 6091 | NamePart_ = input.ReadString(); |
| 6092 | break; |
| 6093 | } |
| 6094 | case 16: { |
| 6095 | IsExtension = input.ReadBool(); |
| 6096 | break; |
| 6097 | } |
| 6098 | } |
| 6099 | } |
| 6100 | } |
| 6101 | |
| 6102 | } |
| 6103 | |
| 6104 | } |
| 6105 | #endregion |
| 6106 | |
| 6107 | } |
| 6108 | |
| 6109 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6110 | /// Encapsulates information about the original source file from which a |
| 6111 | /// FileDescriptorProto was generated. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6112 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6113 | internal sealed partial class SourceCodeInfo : pb::IMessage<SourceCodeInfo> { |
| 6114 | private static readonly pb::MessageParser<SourceCodeInfo> _parser = new pb::MessageParser<SourceCodeInfo>(() => new SourceCodeInfo()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6115 | private pb::UnknownFieldSet _unknownFields; |
| 6116 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6117 | public static pb::MessageParser<SourceCodeInfo> Parser { get { return _parser; } } |
| 6118 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6119 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6120 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6121 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[19]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6122 | } |
| 6123 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6124 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6125 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 6126 | get { return Descriptor; } |
| 6127 | } |
| 6128 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6129 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6130 | public SourceCodeInfo() { |
| 6131 | OnConstruction(); |
| 6132 | } |
| 6133 | |
| 6134 | partial void OnConstruction(); |
| 6135 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6136 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6137 | public SourceCodeInfo(SourceCodeInfo other) : this() { |
| 6138 | location_ = other.location_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6139 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6140 | } |
| 6141 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6142 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6143 | public SourceCodeInfo Clone() { |
| 6144 | return new SourceCodeInfo(this); |
| 6145 | } |
| 6146 | |
| 6147 | /// <summary>Field number for the "location" field.</summary> |
| 6148 | public const int LocationFieldNumber = 1; |
| 6149 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location> _repeated_location_codec |
| 6150 | = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location.Parser); |
| 6151 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location> location_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location>(); |
| 6152 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6153 | /// A Location identifies a piece of source code in a .proto file which |
| 6154 | /// corresponds to a particular definition. This information is intended |
| 6155 | /// to be useful to IDEs, code indexers, documentation generators, and similar |
| 6156 | /// tools. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6157 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6158 | /// For example, say we have a file like: |
| 6159 | /// message Foo { |
| 6160 | /// optional string foo = 1; |
| 6161 | /// } |
| 6162 | /// Let's look at just the field definition: |
| 6163 | /// optional string foo = 1; |
| 6164 | /// ^ ^^ ^^ ^ ^^^ |
| 6165 | /// a bc de f ghi |
| 6166 | /// We have the following locations: |
| 6167 | /// span path represents |
| 6168 | /// [a,i) [ 4, 0, 2, 0 ] The whole field definition. |
| 6169 | /// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). |
| 6170 | /// [c,d) [ 4, 0, 2, 0, 5 ] The type (string). |
| 6171 | /// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). |
| 6172 | /// [g,h) [ 4, 0, 2, 0, 3 ] The number (1). |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6173 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6174 | /// Notes: |
| 6175 | /// - A location may refer to a repeated field itself (i.e. not to any |
| 6176 | /// particular index within it). This is used whenever a set of elements are |
| 6177 | /// logically enclosed in a single code segment. For example, an entire |
| 6178 | /// extend block (possibly containing multiple extension definitions) will |
| 6179 | /// have an outer location whose path refers to the "extensions" repeated |
| 6180 | /// field without an index. |
| 6181 | /// - Multiple locations may have the same path. This happens when a single |
| 6182 | /// logical declaration is spread out across multiple places. The most |
| 6183 | /// obvious example is the "extend" block again -- there may be multiple |
| 6184 | /// extend blocks in the same scope, each of which will have the same path. |
| 6185 | /// - A location's span is not always a subset of its parent's span. For |
| 6186 | /// example, the "extendee" of an extension declaration appears at the |
| 6187 | /// beginning of the "extend" block and is shared by all extensions within |
| 6188 | /// the block. |
| 6189 | /// - Just because a location's span is a subset of some other location's span |
| 6190 | /// does not mean that it is a descendent. For example, a "group" defines |
| 6191 | /// both a type and a field in a single declaration. Thus, the locations |
| 6192 | /// corresponding to the type and field and their components will overlap. |
| 6193 | /// - Code which tries to interpret locations should probably be designed to |
| 6194 | /// ignore those that it doesn't understand, as more types of locations could |
| 6195 | /// be recorded in the future. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6196 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6197 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6198 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location> Location { |
| 6199 | get { return location_; } |
| 6200 | } |
| 6201 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6202 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6203 | public override bool Equals(object other) { |
| 6204 | return Equals(other as SourceCodeInfo); |
| 6205 | } |
| 6206 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6207 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6208 | public bool Equals(SourceCodeInfo other) { |
| 6209 | if (ReferenceEquals(other, null)) { |
| 6210 | return false; |
| 6211 | } |
| 6212 | if (ReferenceEquals(other, this)) { |
| 6213 | return true; |
| 6214 | } |
| 6215 | if(!location_.Equals(other.location_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6216 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6217 | } |
| 6218 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6219 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6220 | public override int GetHashCode() { |
| 6221 | int hash = 1; |
| 6222 | hash ^= location_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6223 | if (_unknownFields != null) { |
| 6224 | hash ^= _unknownFields.GetHashCode(); |
| 6225 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6226 | return hash; |
| 6227 | } |
| 6228 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6229 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6230 | public override string ToString() { |
| 6231 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6232 | } |
| 6233 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6234 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6235 | public void WriteTo(pb::CodedOutputStream output) { |
| 6236 | location_.WriteTo(output, _repeated_location_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6237 | if (_unknownFields != null) { |
| 6238 | _unknownFields.WriteTo(output); |
| 6239 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6240 | } |
| 6241 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6242 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6243 | public int CalculateSize() { |
| 6244 | int size = 0; |
| 6245 | size += location_.CalculateSize(_repeated_location_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6246 | if (_unknownFields != null) { |
| 6247 | size += _unknownFields.CalculateSize(); |
| 6248 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6249 | return size; |
| 6250 | } |
| 6251 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6252 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6253 | public void MergeFrom(SourceCodeInfo other) { |
| 6254 | if (other == null) { |
| 6255 | return; |
| 6256 | } |
| 6257 | location_.Add(other.location_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6258 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6259 | } |
| 6260 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6261 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6262 | public void MergeFrom(pb::CodedInputStream input) { |
| 6263 | uint tag; |
| 6264 | while ((tag = input.ReadTag()) != 0) { |
| 6265 | switch(tag) { |
| 6266 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6267 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6268 | break; |
| 6269 | case 10: { |
| 6270 | location_.AddEntriesFrom(input, _repeated_location_codec); |
| 6271 | break; |
| 6272 | } |
| 6273 | } |
| 6274 | } |
| 6275 | } |
| 6276 | |
| 6277 | #region Nested types |
| 6278 | /// <summary>Container for nested types declared in the SourceCodeInfo message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6279 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6280 | public static partial class Types { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6281 | internal sealed partial class Location : pb::IMessage<Location> { |
| 6282 | private static readonly pb::MessageParser<Location> _parser = new pb::MessageParser<Location>(() => new Location()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6283 | private pb::UnknownFieldSet _unknownFields; |
| 6284 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6285 | public static pb::MessageParser<Location> Parser { get { return _parser; } } |
| 6286 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6287 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6288 | public static pbr::MessageDescriptor Descriptor { |
| 6289 | get { return global::Google.Protobuf.Reflection.SourceCodeInfo.Descriptor.NestedTypes[0]; } |
| 6290 | } |
| 6291 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6292 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6293 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 6294 | get { return Descriptor; } |
| 6295 | } |
| 6296 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6297 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6298 | public Location() { |
| 6299 | OnConstruction(); |
| 6300 | } |
| 6301 | |
| 6302 | partial void OnConstruction(); |
| 6303 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6304 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6305 | public Location(Location other) : this() { |
| 6306 | path_ = other.path_.Clone(); |
| 6307 | span_ = other.span_.Clone(); |
| 6308 | leadingComments_ = other.leadingComments_; |
| 6309 | trailingComments_ = other.trailingComments_; |
| 6310 | leadingDetachedComments_ = other.leadingDetachedComments_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6311 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6312 | } |
| 6313 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6314 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6315 | public Location Clone() { |
| 6316 | return new Location(this); |
| 6317 | } |
| 6318 | |
| 6319 | /// <summary>Field number for the "path" field.</summary> |
| 6320 | public const int PathFieldNumber = 1; |
| 6321 | private static readonly pb::FieldCodec<int> _repeated_path_codec |
| 6322 | = pb::FieldCodec.ForInt32(10); |
| 6323 | private readonly pbc::RepeatedField<int> path_ = new pbc::RepeatedField<int>(); |
| 6324 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6325 | /// Identifies which part of the FileDescriptorProto was defined at this |
| 6326 | /// location. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6327 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6328 | /// Each element is a field number or an index. They form a path from |
| 6329 | /// the root FileDescriptorProto to the place where the definition. For |
| 6330 | /// example, this path: |
| 6331 | /// [ 4, 3, 2, 7, 1 ] |
| 6332 | /// refers to: |
| 6333 | /// file.message_type(3) // 4, 3 |
| 6334 | /// .field(7) // 2, 7 |
| 6335 | /// .name() // 1 |
| 6336 | /// This is because FileDescriptorProto.message_type has field number 4: |
| 6337 | /// repeated DescriptorProto message_type = 4; |
| 6338 | /// and DescriptorProto.field has field number 2: |
| 6339 | /// repeated FieldDescriptorProto field = 2; |
| 6340 | /// and FieldDescriptorProto.name has field number 1: |
| 6341 | /// optional string name = 1; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6342 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6343 | /// Thus, the above path gives the location of a field name. If we removed |
| 6344 | /// the last element: |
| 6345 | /// [ 4, 3, 2, 7 ] |
| 6346 | /// this path refers to the whole field declaration (from the beginning |
| 6347 | /// of the label to the terminating semicolon). |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6348 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6349 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6350 | public pbc::RepeatedField<int> Path { |
| 6351 | get { return path_; } |
| 6352 | } |
| 6353 | |
| 6354 | /// <summary>Field number for the "span" field.</summary> |
| 6355 | public const int SpanFieldNumber = 2; |
| 6356 | private static readonly pb::FieldCodec<int> _repeated_span_codec |
| 6357 | = pb::FieldCodec.ForInt32(18); |
| 6358 | private readonly pbc::RepeatedField<int> span_ = new pbc::RepeatedField<int>(); |
| 6359 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6360 | /// Always has exactly three or four elements: start line, start column, |
| 6361 | /// end line (optional, otherwise assumed same as start line), end column. |
| 6362 | /// These are packed into a single field for efficiency. Note that line |
| 6363 | /// and column numbers are zero-based -- typically you will want to add |
| 6364 | /// 1 to each before displaying to a user. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6365 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6366 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6367 | public pbc::RepeatedField<int> Span { |
| 6368 | get { return span_; } |
| 6369 | } |
| 6370 | |
| 6371 | /// <summary>Field number for the "leading_comments" field.</summary> |
| 6372 | public const int LeadingCommentsFieldNumber = 3; |
| 6373 | private string leadingComments_ = ""; |
| 6374 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6375 | /// If this SourceCodeInfo represents a complete declaration, these are any |
| 6376 | /// comments appearing before and after the declaration which appear to be |
| 6377 | /// attached to the declaration. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6378 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6379 | /// A series of line comments appearing on consecutive lines, with no other |
| 6380 | /// tokens appearing on those lines, will be treated as a single comment. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6381 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6382 | /// leading_detached_comments will keep paragraphs of comments that appear |
| 6383 | /// before (but not connected to) the current element. Each paragraph, |
| 6384 | /// separated by empty lines, will be one comment element in the repeated |
| 6385 | /// field. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6386 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6387 | /// Only the comment content is provided; comment markers (e.g. //) are |
| 6388 | /// stripped out. For block comments, leading whitespace and an asterisk |
| 6389 | /// will be stripped from the beginning of each line other than the first. |
| 6390 | /// Newlines are included in the output. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6391 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6392 | /// Examples: |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6393 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6394 | /// optional int32 foo = 1; // Comment attached to foo. |
| 6395 | /// // Comment attached to bar. |
| 6396 | /// optional int32 bar = 2; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6397 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6398 | /// optional string baz = 3; |
| 6399 | /// // Comment attached to baz. |
| 6400 | /// // Another line attached to baz. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6401 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6402 | /// // Comment attached to qux. |
| 6403 | /// // |
| 6404 | /// // Another line attached to qux. |
| 6405 | /// optional double qux = 4; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6406 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6407 | /// // Detached comment for corge. This is not leading or trailing comments |
| 6408 | /// // to qux or corge because there are blank lines separating it from |
| 6409 | /// // both. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6410 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6411 | /// // Detached comment for corge paragraph 2. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6412 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6413 | /// optional string corge = 5; |
| 6414 | /// /* Block comment attached |
| 6415 | /// * to corge. Leading asterisks |
| 6416 | /// * will be removed. */ |
| 6417 | /// /* Block comment attached to |
| 6418 | /// * grault. */ |
| 6419 | /// optional int32 grault = 6; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6420 | /// |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6421 | /// // ignored detached comments. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6422 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6423 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6424 | public string LeadingComments { |
| 6425 | get { return leadingComments_; } |
| 6426 | set { |
| 6427 | leadingComments_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 6428 | } |
| 6429 | } |
| 6430 | |
| 6431 | /// <summary>Field number for the "trailing_comments" field.</summary> |
| 6432 | public const int TrailingCommentsFieldNumber = 4; |
| 6433 | private string trailingComments_ = ""; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6434 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6435 | public string TrailingComments { |
| 6436 | get { return trailingComments_; } |
| 6437 | set { |
| 6438 | trailingComments_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 6439 | } |
| 6440 | } |
| 6441 | |
| 6442 | /// <summary>Field number for the "leading_detached_comments" field.</summary> |
| 6443 | public const int LeadingDetachedCommentsFieldNumber = 6; |
| 6444 | private static readonly pb::FieldCodec<string> _repeated_leadingDetachedComments_codec |
| 6445 | = pb::FieldCodec.ForString(50); |
| 6446 | private readonly pbc::RepeatedField<string> leadingDetachedComments_ = new pbc::RepeatedField<string>(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6447 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6448 | public pbc::RepeatedField<string> LeadingDetachedComments { |
| 6449 | get { return leadingDetachedComments_; } |
| 6450 | } |
| 6451 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6452 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6453 | public override bool Equals(object other) { |
| 6454 | return Equals(other as Location); |
| 6455 | } |
| 6456 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6457 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6458 | public bool Equals(Location other) { |
| 6459 | if (ReferenceEquals(other, null)) { |
| 6460 | return false; |
| 6461 | } |
| 6462 | if (ReferenceEquals(other, this)) { |
| 6463 | return true; |
| 6464 | } |
| 6465 | if(!path_.Equals(other.path_)) return false; |
| 6466 | if(!span_.Equals(other.span_)) return false; |
| 6467 | if (LeadingComments != other.LeadingComments) return false; |
| 6468 | if (TrailingComments != other.TrailingComments) return false; |
| 6469 | if(!leadingDetachedComments_.Equals(other.leadingDetachedComments_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6470 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6471 | } |
| 6472 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6473 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6474 | public override int GetHashCode() { |
| 6475 | int hash = 1; |
| 6476 | hash ^= path_.GetHashCode(); |
| 6477 | hash ^= span_.GetHashCode(); |
| 6478 | if (LeadingComments.Length != 0) hash ^= LeadingComments.GetHashCode(); |
| 6479 | if (TrailingComments.Length != 0) hash ^= TrailingComments.GetHashCode(); |
| 6480 | hash ^= leadingDetachedComments_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6481 | if (_unknownFields != null) { |
| 6482 | hash ^= _unknownFields.GetHashCode(); |
| 6483 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6484 | return hash; |
| 6485 | } |
| 6486 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6487 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6488 | public override string ToString() { |
| 6489 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6490 | } |
| 6491 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6492 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6493 | public void WriteTo(pb::CodedOutputStream output) { |
| 6494 | path_.WriteTo(output, _repeated_path_codec); |
| 6495 | span_.WriteTo(output, _repeated_span_codec); |
| 6496 | if (LeadingComments.Length != 0) { |
| 6497 | output.WriteRawTag(26); |
| 6498 | output.WriteString(LeadingComments); |
| 6499 | } |
| 6500 | if (TrailingComments.Length != 0) { |
| 6501 | output.WriteRawTag(34); |
| 6502 | output.WriteString(TrailingComments); |
| 6503 | } |
| 6504 | leadingDetachedComments_.WriteTo(output, _repeated_leadingDetachedComments_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6505 | if (_unknownFields != null) { |
| 6506 | _unknownFields.WriteTo(output); |
| 6507 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6508 | } |
| 6509 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6510 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6511 | public int CalculateSize() { |
| 6512 | int size = 0; |
| 6513 | size += path_.CalculateSize(_repeated_path_codec); |
| 6514 | size += span_.CalculateSize(_repeated_span_codec); |
| 6515 | if (LeadingComments.Length != 0) { |
| 6516 | size += 1 + pb::CodedOutputStream.ComputeStringSize(LeadingComments); |
| 6517 | } |
| 6518 | if (TrailingComments.Length != 0) { |
| 6519 | size += 1 + pb::CodedOutputStream.ComputeStringSize(TrailingComments); |
| 6520 | } |
| 6521 | size += leadingDetachedComments_.CalculateSize(_repeated_leadingDetachedComments_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6522 | if (_unknownFields != null) { |
| 6523 | size += _unknownFields.CalculateSize(); |
| 6524 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6525 | return size; |
| 6526 | } |
| 6527 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6528 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6529 | public void MergeFrom(Location other) { |
| 6530 | if (other == null) { |
| 6531 | return; |
| 6532 | } |
| 6533 | path_.Add(other.path_); |
| 6534 | span_.Add(other.span_); |
| 6535 | if (other.LeadingComments.Length != 0) { |
| 6536 | LeadingComments = other.LeadingComments; |
| 6537 | } |
| 6538 | if (other.TrailingComments.Length != 0) { |
| 6539 | TrailingComments = other.TrailingComments; |
| 6540 | } |
| 6541 | leadingDetachedComments_.Add(other.leadingDetachedComments_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6542 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6543 | } |
| 6544 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6545 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6546 | public void MergeFrom(pb::CodedInputStream input) { |
| 6547 | uint tag; |
| 6548 | while ((tag = input.ReadTag()) != 0) { |
| 6549 | switch(tag) { |
| 6550 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6551 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6552 | break; |
| 6553 | case 10: |
| 6554 | case 8: { |
| 6555 | path_.AddEntriesFrom(input, _repeated_path_codec); |
| 6556 | break; |
| 6557 | } |
| 6558 | case 18: |
| 6559 | case 16: { |
| 6560 | span_.AddEntriesFrom(input, _repeated_span_codec); |
| 6561 | break; |
| 6562 | } |
| 6563 | case 26: { |
| 6564 | LeadingComments = input.ReadString(); |
| 6565 | break; |
| 6566 | } |
| 6567 | case 34: { |
| 6568 | TrailingComments = input.ReadString(); |
| 6569 | break; |
| 6570 | } |
| 6571 | case 50: { |
| 6572 | leadingDetachedComments_.AddEntriesFrom(input, _repeated_leadingDetachedComments_codec); |
| 6573 | break; |
| 6574 | } |
| 6575 | } |
| 6576 | } |
| 6577 | } |
| 6578 | |
| 6579 | } |
| 6580 | |
| 6581 | } |
| 6582 | #endregion |
| 6583 | |
| 6584 | } |
| 6585 | |
| 6586 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6587 | /// Describes the relationship between generated code and its original source |
| 6588 | /// file. A GeneratedCodeInfo message is associated with only one generated |
| 6589 | /// source file, but may contain references to different source .proto files. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6590 | /// </summary> |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6591 | internal sealed partial class GeneratedCodeInfo : pb::IMessage<GeneratedCodeInfo> { |
| 6592 | private static readonly pb::MessageParser<GeneratedCodeInfo> _parser = new pb::MessageParser<GeneratedCodeInfo>(() => new GeneratedCodeInfo()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6593 | private pb::UnknownFieldSet _unknownFields; |
| 6594 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6595 | public static pb::MessageParser<GeneratedCodeInfo> Parser { get { return _parser; } } |
| 6596 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6597 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6598 | public static pbr::MessageDescriptor Descriptor { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6599 | get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[20]; } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6600 | } |
| 6601 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6602 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6603 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 6604 | get { return Descriptor; } |
| 6605 | } |
| 6606 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6607 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6608 | public GeneratedCodeInfo() { |
| 6609 | OnConstruction(); |
| 6610 | } |
| 6611 | |
| 6612 | partial void OnConstruction(); |
| 6613 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6614 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6615 | public GeneratedCodeInfo(GeneratedCodeInfo other) : this() { |
| 6616 | annotation_ = other.annotation_.Clone(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6617 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6618 | } |
| 6619 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6620 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6621 | public GeneratedCodeInfo Clone() { |
| 6622 | return new GeneratedCodeInfo(this); |
| 6623 | } |
| 6624 | |
| 6625 | /// <summary>Field number for the "annotation" field.</summary> |
| 6626 | public const int AnnotationFieldNumber = 1; |
| 6627 | private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation> _repeated_annotation_codec |
| 6628 | = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Parser); |
| 6629 | private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation> annotation_ = new pbc::RepeatedField<global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation>(); |
| 6630 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6631 | /// An Annotation connects some span of text in generated code to an element |
| 6632 | /// of its generating .proto file. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6633 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6634 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6635 | public pbc::RepeatedField<global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation> Annotation { |
| 6636 | get { return annotation_; } |
| 6637 | } |
| 6638 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6639 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6640 | public override bool Equals(object other) { |
| 6641 | return Equals(other as GeneratedCodeInfo); |
| 6642 | } |
| 6643 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6644 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6645 | public bool Equals(GeneratedCodeInfo other) { |
| 6646 | if (ReferenceEquals(other, null)) { |
| 6647 | return false; |
| 6648 | } |
| 6649 | if (ReferenceEquals(other, this)) { |
| 6650 | return true; |
| 6651 | } |
| 6652 | if(!annotation_.Equals(other.annotation_)) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6653 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6654 | } |
| 6655 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6656 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6657 | public override int GetHashCode() { |
| 6658 | int hash = 1; |
| 6659 | hash ^= annotation_.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6660 | if (_unknownFields != null) { |
| 6661 | hash ^= _unknownFields.GetHashCode(); |
| 6662 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6663 | return hash; |
| 6664 | } |
| 6665 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6666 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6667 | public override string ToString() { |
| 6668 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6669 | } |
| 6670 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6671 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6672 | public void WriteTo(pb::CodedOutputStream output) { |
| 6673 | annotation_.WriteTo(output, _repeated_annotation_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6674 | if (_unknownFields != null) { |
| 6675 | _unknownFields.WriteTo(output); |
| 6676 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6677 | } |
| 6678 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6679 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6680 | public int CalculateSize() { |
| 6681 | int size = 0; |
| 6682 | size += annotation_.CalculateSize(_repeated_annotation_codec); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6683 | if (_unknownFields != null) { |
| 6684 | size += _unknownFields.CalculateSize(); |
| 6685 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6686 | return size; |
| 6687 | } |
| 6688 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6689 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6690 | public void MergeFrom(GeneratedCodeInfo other) { |
| 6691 | if (other == null) { |
| 6692 | return; |
| 6693 | } |
| 6694 | annotation_.Add(other.annotation_); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6695 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6696 | } |
| 6697 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6698 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6699 | public void MergeFrom(pb::CodedInputStream input) { |
| 6700 | uint tag; |
| 6701 | while ((tag = input.ReadTag()) != 0) { |
| 6702 | switch(tag) { |
| 6703 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6704 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6705 | break; |
| 6706 | case 10: { |
| 6707 | annotation_.AddEntriesFrom(input, _repeated_annotation_codec); |
| 6708 | break; |
| 6709 | } |
| 6710 | } |
| 6711 | } |
| 6712 | } |
| 6713 | |
| 6714 | #region Nested types |
| 6715 | /// <summary>Container for nested types declared in the GeneratedCodeInfo message type.</summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6716 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6717 | public static partial class Types { |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6718 | internal sealed partial class Annotation : pb::IMessage<Annotation> { |
| 6719 | private static readonly pb::MessageParser<Annotation> _parser = new pb::MessageParser<Annotation>(() => new Annotation()); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6720 | private pb::UnknownFieldSet _unknownFields; |
| 6721 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6722 | public static pb::MessageParser<Annotation> Parser { get { return _parser; } } |
| 6723 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6724 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6725 | public static pbr::MessageDescriptor Descriptor { |
| 6726 | get { return global::Google.Protobuf.Reflection.GeneratedCodeInfo.Descriptor.NestedTypes[0]; } |
| 6727 | } |
| 6728 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6729 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6730 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 6731 | get { return Descriptor; } |
| 6732 | } |
| 6733 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6734 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6735 | public Annotation() { |
| 6736 | OnConstruction(); |
| 6737 | } |
| 6738 | |
| 6739 | partial void OnConstruction(); |
| 6740 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6741 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6742 | public Annotation(Annotation other) : this() { |
| 6743 | path_ = other.path_.Clone(); |
| 6744 | sourceFile_ = other.sourceFile_; |
| 6745 | begin_ = other.begin_; |
| 6746 | end_ = other.end_; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6747 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6748 | } |
| 6749 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6750 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6751 | public Annotation Clone() { |
| 6752 | return new Annotation(this); |
| 6753 | } |
| 6754 | |
| 6755 | /// <summary>Field number for the "path" field.</summary> |
| 6756 | public const int PathFieldNumber = 1; |
| 6757 | private static readonly pb::FieldCodec<int> _repeated_path_codec |
| 6758 | = pb::FieldCodec.ForInt32(10); |
| 6759 | private readonly pbc::RepeatedField<int> path_ = new pbc::RepeatedField<int>(); |
| 6760 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6761 | /// Identifies the element in the original source .proto file. This field |
| 6762 | /// is formatted the same as SourceCodeInfo.Location.path. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6763 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6764 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6765 | public pbc::RepeatedField<int> Path { |
| 6766 | get { return path_; } |
| 6767 | } |
| 6768 | |
| 6769 | /// <summary>Field number for the "source_file" field.</summary> |
| 6770 | public const int SourceFileFieldNumber = 2; |
| 6771 | private string sourceFile_ = ""; |
| 6772 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6773 | /// Identifies the filesystem path to the original source .proto. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6774 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6775 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6776 | public string SourceFile { |
| 6777 | get { return sourceFile_; } |
| 6778 | set { |
| 6779 | sourceFile_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 6780 | } |
| 6781 | } |
| 6782 | |
| 6783 | /// <summary>Field number for the "begin" field.</summary> |
| 6784 | public const int BeginFieldNumber = 3; |
| 6785 | private int begin_; |
| 6786 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6787 | /// Identifies the starting offset in bytes in the generated code |
| 6788 | /// that relates to the identified object. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6789 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6790 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6791 | public int Begin { |
| 6792 | get { return begin_; } |
| 6793 | set { |
| 6794 | begin_ = value; |
| 6795 | } |
| 6796 | } |
| 6797 | |
| 6798 | /// <summary>Field number for the "end" field.</summary> |
| 6799 | public const int EndFieldNumber = 4; |
| 6800 | private int end_; |
| 6801 | /// <summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6802 | /// Identifies the ending offset in bytes in the generated code that |
| 6803 | /// relates to the identified offset. The end offset should be one past |
| 6804 | /// the last relevant byte (so the length of the text = end - begin). |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6805 | /// </summary> |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6806 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6807 | public int End { |
| 6808 | get { return end_; } |
| 6809 | set { |
| 6810 | end_ = value; |
| 6811 | } |
| 6812 | } |
| 6813 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6814 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6815 | public override bool Equals(object other) { |
| 6816 | return Equals(other as Annotation); |
| 6817 | } |
| 6818 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6819 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6820 | public bool Equals(Annotation other) { |
| 6821 | if (ReferenceEquals(other, null)) { |
| 6822 | return false; |
| 6823 | } |
| 6824 | if (ReferenceEquals(other, this)) { |
| 6825 | return true; |
| 6826 | } |
| 6827 | if(!path_.Equals(other.path_)) return false; |
| 6828 | if (SourceFile != other.SourceFile) return false; |
| 6829 | if (Begin != other.Begin) return false; |
| 6830 | if (End != other.End) return false; |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6831 | return Equals(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6832 | } |
| 6833 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6834 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6835 | public override int GetHashCode() { |
| 6836 | int hash = 1; |
| 6837 | hash ^= path_.GetHashCode(); |
| 6838 | if (SourceFile.Length != 0) hash ^= SourceFile.GetHashCode(); |
| 6839 | if (Begin != 0) hash ^= Begin.GetHashCode(); |
| 6840 | if (End != 0) hash ^= End.GetHashCode(); |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6841 | if (_unknownFields != null) { |
| 6842 | hash ^= _unknownFields.GetHashCode(); |
| 6843 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6844 | return hash; |
| 6845 | } |
| 6846 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6847 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6848 | public override string ToString() { |
| 6849 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 6850 | } |
| 6851 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6852 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6853 | public void WriteTo(pb::CodedOutputStream output) { |
| 6854 | path_.WriteTo(output, _repeated_path_codec); |
| 6855 | if (SourceFile.Length != 0) { |
| 6856 | output.WriteRawTag(18); |
| 6857 | output.WriteString(SourceFile); |
| 6858 | } |
| 6859 | if (Begin != 0) { |
| 6860 | output.WriteRawTag(24); |
| 6861 | output.WriteInt32(Begin); |
| 6862 | } |
| 6863 | if (End != 0) { |
| 6864 | output.WriteRawTag(32); |
| 6865 | output.WriteInt32(End); |
| 6866 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6867 | if (_unknownFields != null) { |
| 6868 | _unknownFields.WriteTo(output); |
| 6869 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6870 | } |
| 6871 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6872 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6873 | public int CalculateSize() { |
| 6874 | int size = 0; |
| 6875 | size += path_.CalculateSize(_repeated_path_codec); |
| 6876 | if (SourceFile.Length != 0) { |
| 6877 | size += 1 + pb::CodedOutputStream.ComputeStringSize(SourceFile); |
| 6878 | } |
| 6879 | if (Begin != 0) { |
| 6880 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Begin); |
| 6881 | } |
| 6882 | if (End != 0) { |
| 6883 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(End); |
| 6884 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6885 | if (_unknownFields != null) { |
| 6886 | size += _unknownFields.CalculateSize(); |
| 6887 | } |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6888 | return size; |
| 6889 | } |
| 6890 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6891 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6892 | public void MergeFrom(Annotation other) { |
| 6893 | if (other == null) { |
| 6894 | return; |
| 6895 | } |
| 6896 | path_.Add(other.path_); |
| 6897 | if (other.SourceFile.Length != 0) { |
| 6898 | SourceFile = other.SourceFile; |
| 6899 | } |
| 6900 | if (other.Begin != 0) { |
| 6901 | Begin = other.Begin; |
| 6902 | } |
| 6903 | if (other.End != 0) { |
| 6904 | End = other.End; |
| 6905 | } |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6906 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6907 | } |
| 6908 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6909 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6910 | public void MergeFrom(pb::CodedInputStream input) { |
| 6911 | uint tag; |
| 6912 | while ((tag = input.ReadTag()) != 0) { |
| 6913 | switch(tag) { |
| 6914 | default: |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 6915 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6916 | break; |
| 6917 | case 10: |
| 6918 | case 8: { |
| 6919 | path_.AddEntriesFrom(input, _repeated_path_codec); |
| 6920 | break; |
| 6921 | } |
| 6922 | case 18: { |
| 6923 | SourceFile = input.ReadString(); |
| 6924 | break; |
| 6925 | } |
| 6926 | case 24: { |
| 6927 | Begin = input.ReadInt32(); |
| 6928 | break; |
| 6929 | } |
| 6930 | case 32: { |
| 6931 | End = input.ReadInt32(); |
| 6932 | break; |
| 6933 | } |
| 6934 | } |
| 6935 | } |
| 6936 | } |
| 6937 | |
| 6938 | } |
| 6939 | |
| 6940 | } |
| 6941 | #endregion |
| 6942 | |
| 6943 | } |
| 6944 | |
| 6945 | #endregion |
| 6946 | |
| 6947 | } |
| 6948 | |
| 6949 | #endregion Designer generated code |