215 lines
6.8 KiB
C#
215 lines
6.8 KiB
C#
/**
|
|
* <auto-generated>
|
|
* Autogenerated by Thrift Compiler (0.22.0)
|
|
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
* </auto-generated>
|
|
*/
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using Thrift;
|
|
using Thrift.Collections;
|
|
using System.Runtime.Serialization;
|
|
using Thrift.Protocol;
|
|
using Thrift.Protocol.Entities;
|
|
using Thrift.Protocol.Utilities;
|
|
using Thrift.Transport;
|
|
using Thrift.Transport.Client;
|
|
|
|
|
|
#pragma warning disable IDE0079 // remove unnecessary pragmas
|
|
#pragma warning disable IDE0017 // object init can be simplified
|
|
#pragma warning disable IDE0028 // collection init can be simplified
|
|
#pragma warning disable IDE0305 // collection init can be simplified
|
|
#pragma warning disable IDE0034 // simplify default expression
|
|
#pragma warning disable IDE0066 // use switch expression
|
|
#pragma warning disable IDE0090 // simplify new expression
|
|
#pragma warning disable IDE0290 // use primary CTOR
|
|
#pragma warning disable IDE1006 // parts of the code use IDL spelling
|
|
#pragma warning disable CA1822 // empty DeepCopy() methods still non-static
|
|
#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions
|
|
|
|
namespace Byway.Thrift.Data
|
|
{
|
|
|
|
[DataContract(Namespace="")]
|
|
public partial class ChampshipRankReward : TBase
|
|
{
|
|
private Dictionary<int, global::Byway.Thrift.Data.ChampshipRankRewardItem> _champshiprankrewards;
|
|
|
|
[DataMember(Order = 0)]
|
|
public Dictionary<int, global::Byway.Thrift.Data.ChampshipRankRewardItem> Champshiprankrewards
|
|
{
|
|
get
|
|
{
|
|
return _champshiprankrewards;
|
|
}
|
|
set
|
|
{
|
|
__isset.@champshiprankrewards = true;
|
|
this._champshiprankrewards = value;
|
|
}
|
|
}
|
|
|
|
|
|
[DataMember(Order = 1)]
|
|
public Isset __isset;
|
|
[DataContract]
|
|
public struct Isset
|
|
{
|
|
[DataMember]
|
|
public bool @champshiprankrewards;
|
|
}
|
|
|
|
#region XmlSerializer support
|
|
|
|
public bool ShouldSerializeChampshiprankrewards()
|
|
{
|
|
return __isset.@champshiprankrewards;
|
|
}
|
|
|
|
#endregion XmlSerializer support
|
|
|
|
public ChampshipRankReward()
|
|
{
|
|
}
|
|
|
|
public ChampshipRankReward DeepCopy()
|
|
{
|
|
var tmp5 = new ChampshipRankReward();
|
|
if((Champshiprankrewards != null) && __isset.@champshiprankrewards)
|
|
{
|
|
tmp5.Champshiprankrewards = this.Champshiprankrewards.DeepCopy();
|
|
}
|
|
tmp5.__isset.@champshiprankrewards = this.__isset.@champshiprankrewards;
|
|
return tmp5;
|
|
}
|
|
|
|
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
|
|
{
|
|
iprot.IncrementRecursionDepth();
|
|
try
|
|
{
|
|
TField field;
|
|
await iprot.ReadStructBeginAsync(cancellationToken);
|
|
while (true)
|
|
{
|
|
field = await iprot.ReadFieldBeginAsync(cancellationToken);
|
|
if (field.Type == TType.Stop)
|
|
{
|
|
break;
|
|
}
|
|
|
|
switch (field.ID)
|
|
{
|
|
case 1:
|
|
if (field.Type == TType.Map)
|
|
{
|
|
{
|
|
var _map6 = await iprot.ReadMapBeginAsync(cancellationToken);
|
|
Champshiprankrewards = new Dictionary<int, global::Byway.Thrift.Data.ChampshipRankRewardItem>(_map6.Count);
|
|
for(int _i7 = 0; _i7 < _map6.Count; ++_i7)
|
|
{
|
|
int _key8;
|
|
global::Byway.Thrift.Data.ChampshipRankRewardItem _val9;
|
|
_key8 = await iprot.ReadI32Async(cancellationToken);
|
|
_val9 = new global::Byway.Thrift.Data.ChampshipRankRewardItem();
|
|
await _val9.ReadAsync(iprot, cancellationToken);
|
|
Champshiprankrewards[_key8] = _val9;
|
|
}
|
|
await iprot.ReadMapEndAsync(cancellationToken);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
|
}
|
|
break;
|
|
default:
|
|
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
|
break;
|
|
}
|
|
|
|
await iprot.ReadFieldEndAsync(cancellationToken);
|
|
}
|
|
|
|
await iprot.ReadStructEndAsync(cancellationToken);
|
|
}
|
|
finally
|
|
{
|
|
iprot.DecrementRecursionDepth();
|
|
}
|
|
}
|
|
|
|
public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
|
|
{
|
|
oprot.IncrementRecursionDepth();
|
|
try
|
|
{
|
|
var tmp10 = new TStruct("ChampshipRankReward");
|
|
await oprot.WriteStructBeginAsync(tmp10, cancellationToken);
|
|
var tmp11 = new TField();
|
|
if((Champshiprankrewards != null) && __isset.@champshiprankrewards)
|
|
{
|
|
tmp11.Name = "champshiprankrewards";
|
|
tmp11.Type = TType.Map;
|
|
tmp11.ID = 1;
|
|
await oprot.WriteFieldBeginAsync(tmp11, cancellationToken);
|
|
await oprot.WriteMapBeginAsync(new TMap(TType.I32, TType.Struct, Champshiprankrewards.Count), cancellationToken);
|
|
foreach (int _iter12 in Champshiprankrewards.Keys)
|
|
{
|
|
await oprot.WriteI32Async(_iter12, cancellationToken);
|
|
await Champshiprankrewards[_iter12].WriteAsync(oprot, cancellationToken);
|
|
}
|
|
await oprot.WriteMapEndAsync(cancellationToken);
|
|
await oprot.WriteFieldEndAsync(cancellationToken);
|
|
}
|
|
await oprot.WriteFieldStopAsync(cancellationToken);
|
|
await oprot.WriteStructEndAsync(cancellationToken);
|
|
}
|
|
finally
|
|
{
|
|
oprot.DecrementRecursionDepth();
|
|
}
|
|
}
|
|
|
|
public override bool Equals(object that)
|
|
{
|
|
if (!(that is ChampshipRankReward other)) return false;
|
|
if (ReferenceEquals(this, other)) return true;
|
|
return ((__isset.@champshiprankrewards == other.__isset.@champshiprankrewards) && ((!__isset.@champshiprankrewards) || (TCollections.Equals(Champshiprankrewards, other.Champshiprankrewards))));
|
|
}
|
|
|
|
public override int GetHashCode() {
|
|
int hashcode = 157;
|
|
unchecked {
|
|
if((Champshiprankrewards != null) && __isset.@champshiprankrewards)
|
|
{
|
|
hashcode = (hashcode * 397) + TCollections.GetHashCode(Champshiprankrewards);
|
|
}
|
|
}
|
|
return hashcode;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
var tmp13 = new StringBuilder("ChampshipRankReward(");
|
|
int tmp14 = 0;
|
|
if((Champshiprankrewards != null) && __isset.@champshiprankrewards)
|
|
{
|
|
if(0 < tmp14++) { tmp13.Append(", "); }
|
|
tmp13.Append("Champshiprankrewards: ");
|
|
Champshiprankrewards.ToString(tmp13);
|
|
}
|
|
tmp13.Append(')');
|
|
return tmp13.ToString();
|
|
}
|
|
}
|
|
|
|
}
|