Files
2026-06-04 11:42:34 +02:00

419 lines
10 KiB
C#

using System;
using System.Diagnostics;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;
namespace Google.Protobuf.WellKnownTypes
{
// Token: 0x0200001C RID: 28
public sealed class Api : IMessage<Api>, IMessage, IEquatable<Api>, IDeepCloneable<Api>
{
// Token: 0x17000030 RID: 48
// (get) Token: 0x0600016E RID: 366 RVA: 0x00008021 File Offset: 0x00006221
[DebuggerNonUserCode]
public static MessageParser<Api> Parser
{
get
{
return Api._parser;
}
}
// Token: 0x17000031 RID: 49
// (get) Token: 0x0600016F RID: 367 RVA: 0x00008028 File Offset: 0x00006228
[DebuggerNonUserCode]
public static MessageDescriptor Descriptor
{
get
{
return ApiReflection.Descriptor.MessageTypes[0];
}
}
// Token: 0x17000032 RID: 50
// (get) Token: 0x06000170 RID: 368 RVA: 0x0000803A File Offset: 0x0000623A
[DebuggerNonUserCode]
MessageDescriptor IMessage.Descriptor
{
get
{
return Api.Descriptor;
}
}
// Token: 0x06000171 RID: 369 RVA: 0x00008041 File Offset: 0x00006241
[DebuggerNonUserCode]
public Api()
{
}
// Token: 0x06000172 RID: 370 RVA: 0x00008080 File Offset: 0x00006280
[DebuggerNonUserCode]
public Api(Api other)
: this()
{
this.name_ = other.name_;
this.methods_ = other.methods_.Clone();
this.options_ = other.options_.Clone();
this.version_ = other.version_;
this.SourceContext = ((other.sourceContext_ != null) ? other.SourceContext.Clone() : null);
this.mixins_ = other.mixins_.Clone();
this.syntax_ = other.syntax_;
}
// Token: 0x06000173 RID: 371 RVA: 0x00008106 File Offset: 0x00006306
[DebuggerNonUserCode]
public Api Clone()
{
return new Api(this);
}
// Token: 0x17000033 RID: 51
// (get) Token: 0x06000174 RID: 372 RVA: 0x0000810E File Offset: 0x0000630E
// (set) Token: 0x06000175 RID: 373 RVA: 0x00008116 File Offset: 0x00006316
[DebuggerNonUserCode]
public string Name
{
get
{
return this.name_;
}
set
{
this.name_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
}
}
// Token: 0x17000034 RID: 52
// (get) Token: 0x06000176 RID: 374 RVA: 0x00008129 File Offset: 0x00006329
[DebuggerNonUserCode]
public RepeatedField<Method> Methods
{
get
{
return this.methods_;
}
}
// Token: 0x17000035 RID: 53
// (get) Token: 0x06000177 RID: 375 RVA: 0x00008131 File Offset: 0x00006331
[DebuggerNonUserCode]
public RepeatedField<Option> Options
{
get
{
return this.options_;
}
}
// Token: 0x17000036 RID: 54
// (get) Token: 0x06000178 RID: 376 RVA: 0x00008139 File Offset: 0x00006339
// (set) Token: 0x06000179 RID: 377 RVA: 0x00008141 File Offset: 0x00006341
[DebuggerNonUserCode]
public string Version
{
get
{
return this.version_;
}
set
{
this.version_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
}
}
// Token: 0x17000037 RID: 55
// (get) Token: 0x0600017A RID: 378 RVA: 0x00008154 File Offset: 0x00006354
// (set) Token: 0x0600017B RID: 379 RVA: 0x0000815C File Offset: 0x0000635C
[DebuggerNonUserCode]
public SourceContext SourceContext
{
get
{
return this.sourceContext_;
}
set
{
this.sourceContext_ = value;
}
}
// Token: 0x17000038 RID: 56
// (get) Token: 0x0600017C RID: 380 RVA: 0x00008165 File Offset: 0x00006365
[DebuggerNonUserCode]
public RepeatedField<Mixin> Mixins
{
get
{
return this.mixins_;
}
}
// Token: 0x17000039 RID: 57
// (get) Token: 0x0600017D RID: 381 RVA: 0x0000816D File Offset: 0x0000636D
// (set) Token: 0x0600017E RID: 382 RVA: 0x00008175 File Offset: 0x00006375
[DebuggerNonUserCode]
public Syntax Syntax
{
get
{
return this.syntax_;
}
set
{
this.syntax_ = value;
}
}
// Token: 0x0600017F RID: 383 RVA: 0x0000817E File Offset: 0x0000637E
[DebuggerNonUserCode]
public override bool Equals(object other)
{
return this.Equals(other as Api);
}
// Token: 0x06000180 RID: 384 RVA: 0x0000818C File Offset: 0x0000638C
[DebuggerNonUserCode]
public bool Equals(Api other)
{
return other != null && (other == this || (!(this.Name != other.Name) && this.methods_.Equals(other.methods_) && this.options_.Equals(other.options_) && !(this.Version != other.Version) && object.Equals(this.SourceContext, other.SourceContext) && this.mixins_.Equals(other.mixins_) && this.Syntax == other.Syntax));
}
// Token: 0x06000181 RID: 385 RVA: 0x00008234 File Offset: 0x00006434
[DebuggerNonUserCode]
public override int GetHashCode()
{
int num = 1;
if (this.Name.Length != 0)
{
num ^= this.Name.GetHashCode();
}
num ^= this.methods_.GetHashCode();
num ^= this.options_.GetHashCode();
if (this.Version.Length != 0)
{
num ^= this.Version.GetHashCode();
}
if (this.sourceContext_ != null)
{
num ^= this.SourceContext.GetHashCode();
}
num ^= this.mixins_.GetHashCode();
if (this.Syntax != Syntax.Proto2)
{
num ^= this.Syntax.GetHashCode();
}
return num;
}
// Token: 0x06000182 RID: 386 RVA: 0x00007C02 File Offset: 0x00005E02
[DebuggerNonUserCode]
public override string ToString()
{
return JsonFormatter.ToDiagnosticString(this);
}
// Token: 0x06000183 RID: 387 RVA: 0x000082DC File Offset: 0x000064DC
[DebuggerNonUserCode]
public void WriteTo(CodedOutputStream output)
{
if (this.Name.Length != 0)
{
output.WriteRawTag(10);
output.WriteString(this.Name);
}
this.methods_.WriteTo(output, Api._repeated_methods_codec);
this.options_.WriteTo(output, Api._repeated_options_codec);
if (this.Version.Length != 0)
{
output.WriteRawTag(34);
output.WriteString(this.Version);
}
if (this.sourceContext_ != null)
{
output.WriteRawTag(42);
output.WriteMessage(this.SourceContext);
}
this.mixins_.WriteTo(output, Api._repeated_mixins_codec);
if (this.Syntax != Syntax.Proto2)
{
output.WriteRawTag(56);
output.WriteEnum((int)this.Syntax);
}
}
// Token: 0x06000184 RID: 388 RVA: 0x00008398 File Offset: 0x00006598
[DebuggerNonUserCode]
public int CalculateSize()
{
int num = 0;
if (this.Name.Length != 0)
{
num += 1 + CodedOutputStream.ComputeStringSize(this.Name);
}
num += this.methods_.CalculateSize(Api._repeated_methods_codec);
num += this.options_.CalculateSize(Api._repeated_options_codec);
if (this.Version.Length != 0)
{
num += 1 + CodedOutputStream.ComputeStringSize(this.Version);
}
if (this.sourceContext_ != null)
{
num += 1 + CodedOutputStream.ComputeMessageSize(this.SourceContext);
}
num += this.mixins_.CalculateSize(Api._repeated_mixins_codec);
if (this.Syntax != Syntax.Proto2)
{
num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Syntax);
}
return num;
}
// Token: 0x06000185 RID: 389 RVA: 0x0000844C File Offset: 0x0000664C
[DebuggerNonUserCode]
public void MergeFrom(Api other)
{
if (other == null)
{
return;
}
if (other.Name.Length != 0)
{
this.Name = other.Name;
}
this.methods_.Add(other.methods_);
this.options_.Add(other.options_);
if (other.Version.Length != 0)
{
this.Version = other.Version;
}
if (other.sourceContext_ != null)
{
if (this.sourceContext_ == null)
{
this.sourceContext_ = new SourceContext();
}
this.SourceContext.MergeFrom(other.SourceContext);
}
this.mixins_.Add(other.mixins_);
if (other.Syntax != Syntax.Proto2)
{
this.Syntax = other.Syntax;
}
}
// Token: 0x06000186 RID: 390 RVA: 0x00008504 File Offset: 0x00006704
[DebuggerNonUserCode]
public void MergeFrom(CodedInputStream input)
{
uint num;
while ((num = input.ReadTag()) != 0U)
{
if (num <= 26U)
{
if (num == 10U)
{
this.Name = input.ReadString();
continue;
}
if (num == 18U)
{
this.methods_.AddEntriesFrom(input, Api._repeated_methods_codec);
continue;
}
if (num == 26U)
{
this.options_.AddEntriesFrom(input, Api._repeated_options_codec);
continue;
}
}
else if (num <= 42U)
{
if (num == 34U)
{
this.Version = input.ReadString();
continue;
}
if (num == 42U)
{
if (this.sourceContext_ == null)
{
this.sourceContext_ = new SourceContext();
}
input.ReadMessage(this.sourceContext_);
continue;
}
}
else
{
if (num == 50U)
{
this.mixins_.AddEntriesFrom(input, Api._repeated_mixins_codec);
continue;
}
if (num == 56U)
{
this.syntax_ = (Syntax)input.ReadEnum();
continue;
}
}
input.SkipLastField();
}
}
// Token: 0x04000056 RID: 86
private static readonly MessageParser<Api> _parser = new MessageParser<Api>(() => new Api());
// Token: 0x04000057 RID: 87
public const int NameFieldNumber = 1;
// Token: 0x04000058 RID: 88
private string name_ = "";
// Token: 0x04000059 RID: 89
public const int MethodsFieldNumber = 2;
// Token: 0x0400005A RID: 90
private static readonly FieldCodec<Method> _repeated_methods_codec = FieldCodec.ForMessage<Method>(18U, Method.Parser);
// Token: 0x0400005B RID: 91
private readonly RepeatedField<Method> methods_ = new RepeatedField<Method>();
// Token: 0x0400005C RID: 92
public const int OptionsFieldNumber = 3;
// Token: 0x0400005D RID: 93
private static readonly FieldCodec<Option> _repeated_options_codec = FieldCodec.ForMessage<Option>(26U, Option.Parser);
// Token: 0x0400005E RID: 94
private readonly RepeatedField<Option> options_ = new RepeatedField<Option>();
// Token: 0x0400005F RID: 95
public const int VersionFieldNumber = 4;
// Token: 0x04000060 RID: 96
private string version_ = "";
// Token: 0x04000061 RID: 97
public const int SourceContextFieldNumber = 5;
// Token: 0x04000062 RID: 98
private SourceContext sourceContext_;
// Token: 0x04000063 RID: 99
public const int MixinsFieldNumber = 6;
// Token: 0x04000064 RID: 100
private static readonly FieldCodec<Mixin> _repeated_mixins_codec = FieldCodec.ForMessage<Mixin>(50U, Mixin.Parser);
// Token: 0x04000065 RID: 101
private readonly RepeatedField<Mixin> mixins_ = new RepeatedField<Mixin>();
// Token: 0x04000066 RID: 102
public const int SyntaxFieldNumber = 7;
// Token: 0x04000067 RID: 103
private Syntax syntax_;
}
}