From 9489817df2cbe096170007a1e6deea45745a2c55 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Tue, 1 Sep 2015 15:47:48 +0100 Subject: Regenerated code. Most changes are whitespace, removing trailing spaces. Other changes are due to the well-known types changing without us regenerating. --- csharp/src/Google.Protobuf/WellKnownTypes/Api.cs | 232 +++++++++++++++++++++-- 1 file changed, 217 insertions(+), 15 deletions(-) (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/Api.cs') diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs index a5f95093..4d06ff35 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs @@ -23,24 +23,28 @@ namespace Google.Protobuf.WellKnownTypes { static Api() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Chlnb29nbGUvcHJvdG9idWYvYXBpLnByb3RvEg9nb29nbGUucHJvdG9idWYa", - "JGdvb2dsZS9wcm90b2J1Zi9zb3VyY2VfY29udGV4dC5wcm90bxoaZ29vZ2xl", - "L3Byb3RvYnVmL3R5cGUucHJvdG8isAEKA0FwaRIMCgRuYW1lGAEgASgJEigK", - "B21ldGhvZHMYAiADKAsyFy5nb29nbGUucHJvdG9idWYuTWV0aG9kEigKB29w", - "dGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9uEg8KB3ZlcnNp", - "b24YBCABKAkSNgoOc291cmNlX2NvbnRleHQYBSABKAsyHi5nb29nbGUucHJv", - "dG9idWYuU291cmNlQ29udGV4dCKsAQoGTWV0aG9kEgwKBG5hbWUYASABKAkS", - "GAoQcmVxdWVzdF90eXBlX3VybBgCIAEoCRIZChFyZXF1ZXN0X3N0cmVhbWlu", - "ZxgDIAEoCBIZChFyZXNwb25zZV90eXBlX3VybBgEIAEoCRIaChJyZXNwb25z", - "ZV9zdHJlYW1pbmcYBSABKAgSKAoHb3B0aW9ucxgGIAMoCzIXLmdvb2dsZS5w", - "cm90b2J1Zi5PcHRpb25CSAoTY29tLmdvb2dsZS5wcm90b2J1ZkIIQXBpUHJv", - "dG9QAaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IG", - "cHJvdG8z")); + "Chlnb29nbGUvcHJvdG9idWYvYXBpLnByb3RvEg9nb29nbGUucHJvdG9idWYa", + "JGdvb2dsZS9wcm90b2J1Zi9zb3VyY2VfY29udGV4dC5wcm90bxoaZ29vZ2xl", + "L3Byb3RvYnVmL3R5cGUucHJvdG8igQIKA0FwaRIMCgRuYW1lGAEgASgJEigK", + "B21ldGhvZHMYAiADKAsyFy5nb29nbGUucHJvdG9idWYuTWV0aG9kEigKB29w", + "dGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9uEg8KB3ZlcnNp", + "b24YBCABKAkSNgoOc291cmNlX2NvbnRleHQYBSABKAsyHi5nb29nbGUucHJv", + "dG9idWYuU291cmNlQ29udGV4dBImCgZtaXhpbnMYBiADKAsyFi5nb29nbGUu", + "cHJvdG9idWYuTWl4aW4SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3Rv", + "YnVmLlN5bnRheCLVAQoGTWV0aG9kEgwKBG5hbWUYASABKAkSGAoQcmVxdWVz", + "dF90eXBlX3VybBgCIAEoCRIZChFyZXF1ZXN0X3N0cmVhbWluZxgDIAEoCBIZ", + "ChFyZXNwb25zZV90eXBlX3VybBgEIAEoCRIaChJyZXNwb25zZV9zdHJlYW1p", + "bmcYBSABKAgSKAoHb3B0aW9ucxgGIAMoCzIXLmdvb2dsZS5wcm90b2J1Zi5P", + "cHRpb24SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRh", + "eCIjCgVNaXhpbhIMCgRuYW1lGAEgASgJEgwKBHJvb3QYAiABKAlCSwoTY29t", + "Lmdvb2dsZS5wcm90b2J1ZkIIQXBpUHJvdG9QAaABAaICA0dQQqoCHkdvb2ds", + "ZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.Proto.SourceContext.Descriptor, global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor, }, new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { - new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Api), new[]{ "Name", "Methods", "Options", "Version", "SourceContext" }, null, null, null), - new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Method), new[]{ "Name", "RequestTypeUrl", "RequestStreaming", "ResponseTypeUrl", "ResponseStreaming", "Options" }, null, null, null) + new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Api), new[]{ "Name", "Methods", "Options", "Version", "SourceContext", "Mixins", "Syntax" }, null, null, null), + new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Method), new[]{ "Name", "RequestTypeUrl", "RequestStreaming", "ResponseTypeUrl", "ResponseStreaming", "Options", "Syntax" }, null, null, null), + new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Mixin), new[]{ "Name", "Root" }, null, null, null) })); } #endregion @@ -73,6 +77,8 @@ namespace Google.Protobuf.WellKnownTypes { options_ = other.options_.Clone(); version_ = other.version_; SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null; + mixins_ = other.mixins_.Clone(); + syntax_ = other.syntax_; } public Api Clone() { @@ -122,6 +128,23 @@ namespace Google.Protobuf.WellKnownTypes { } } + public const int MixinsFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_mixins_codec + = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Mixin.Parser); + private readonly pbc::RepeatedField mixins_ = new pbc::RepeatedField(); + public pbc::RepeatedField Mixins { + get { return mixins_; } + } + + public const int SyntaxFieldNumber = 7; + private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2; + public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { + get { return syntax_; } + set { + syntax_ = value; + } + } + public override bool Equals(object other) { return Equals(other as Api); } @@ -138,6 +161,8 @@ namespace Google.Protobuf.WellKnownTypes { if(!options_.Equals(other.options_)) return false; if (Version != other.Version) return false; if (!object.Equals(SourceContext, other.SourceContext)) return false; + if(!mixins_.Equals(other.mixins_)) return false; + if (Syntax != other.Syntax) return false; return true; } @@ -148,6 +173,8 @@ namespace Google.Protobuf.WellKnownTypes { hash ^= options_.GetHashCode(); if (Version.Length != 0) hash ^= Version.GetHashCode(); if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); + hash ^= mixins_.GetHashCode(); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) hash ^= Syntax.GetHashCode(); return hash; } @@ -170,6 +197,11 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(42); output.WriteMessage(SourceContext); } + mixins_.WriteTo(output, _repeated_mixins_codec); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) { + output.WriteRawTag(56); + output.WriteEnum((int) Syntax); + } } public int CalculateSize() { @@ -185,6 +217,10 @@ namespace Google.Protobuf.WellKnownTypes { if (sourceContext_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); } + size += mixins_.CalculateSize(_repeated_mixins_codec); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); + } return size; } @@ -206,6 +242,10 @@ namespace Google.Protobuf.WellKnownTypes { } SourceContext.MergeFrom(other.SourceContext); } + mixins_.Add(other.mixins_); + if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) { + Syntax = other.Syntax; + } } public void MergeFrom(pb::CodedInputStream input) { @@ -238,6 +278,14 @@ namespace Google.Protobuf.WellKnownTypes { input.ReadMessage(sourceContext_); break; } + case 50: { + mixins_.AddEntriesFrom(input, _repeated_mixins_codec); + break; + } + case 56: { + syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); + break; + } } } } @@ -270,6 +318,7 @@ namespace Google.Protobuf.WellKnownTypes { responseTypeUrl_ = other.responseTypeUrl_; responseStreaming_ = other.responseStreaming_; options_ = other.options_.Clone(); + syntax_ = other.syntax_; } public Method Clone() { @@ -329,6 +378,15 @@ namespace Google.Protobuf.WellKnownTypes { get { return options_; } } + public const int SyntaxFieldNumber = 7; + private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2; + public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { + get { return syntax_; } + set { + syntax_ = value; + } + } + public override bool Equals(object other) { return Equals(other as Method); } @@ -346,6 +404,7 @@ namespace Google.Protobuf.WellKnownTypes { if (ResponseTypeUrl != other.ResponseTypeUrl) return false; if (ResponseStreaming != other.ResponseStreaming) return false; if(!options_.Equals(other.options_)) return false; + if (Syntax != other.Syntax) return false; return true; } @@ -357,6 +416,7 @@ namespace Google.Protobuf.WellKnownTypes { if (ResponseTypeUrl.Length != 0) hash ^= ResponseTypeUrl.GetHashCode(); if (ResponseStreaming != false) hash ^= ResponseStreaming.GetHashCode(); hash ^= options_.GetHashCode(); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) hash ^= Syntax.GetHashCode(); return hash; } @@ -386,6 +446,10 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteBool(ResponseStreaming); } options_.WriteTo(output, _repeated_options_codec); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) { + output.WriteRawTag(56); + output.WriteEnum((int) Syntax); + } } public int CalculateSize() { @@ -406,6 +470,9 @@ namespace Google.Protobuf.WellKnownTypes { size += 1 + 1; } size += options_.CalculateSize(_repeated_options_codec); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); + } return size; } @@ -429,6 +496,9 @@ namespace Google.Protobuf.WellKnownTypes { ResponseStreaming = other.ResponseStreaming; } options_.Add(other.options_); + if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) { + Syntax = other.Syntax; + } } public void MergeFrom(pb::CodedInputStream input) { @@ -462,6 +532,138 @@ namespace Google.Protobuf.WellKnownTypes { options_.AddEntriesFrom(input, _repeated_options_codec); break; } + case 56: { + syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); + break; + } + } + } + } + + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Mixin : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Mixin()); + public static pb::MessageParser Parser { get { return _parser; } } + + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Api.Descriptor.MessageTypes[2]; } + } + + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + public Mixin() { + OnConstruction(); + } + + partial void OnConstruction(); + + public Mixin(Mixin other) : this() { + name_ = other.name_; + root_ = other.root_; + } + + public Mixin Clone() { + return new Mixin(this); + } + + public const int NameFieldNumber = 1; + private string name_ = ""; + public string Name { + get { return name_; } + set { + name_ = pb::Preconditions.CheckNotNull(value, "value"); + } + } + + public const int RootFieldNumber = 2; + private string root_ = ""; + public string Root { + get { return root_; } + set { + root_ = pb::Preconditions.CheckNotNull(value, "value"); + } + } + + public override bool Equals(object other) { + return Equals(other as Mixin); + } + + public bool Equals(Mixin other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Root != other.Root) return false; + return true; + } + + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Root.Length != 0) hash ^= Root.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Root.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Root); + } + } + + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Root.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Root); + } + return size; + } + + public void MergeFrom(Mixin other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Root.Length != 0) { + Root = other.Root; + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Root = input.ReadString(); + break; + } } } } -- cgit v1.2.3