blob: 501e3a3ea9b86a4af81777ebae22f2471fc86480 [file] [log] [blame]
/**
* Autogenerated by Thrift Compiler (0.14.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @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 Microsoft.Extensions.Logging;
using Thrift;
using Thrift.Collections;
using Thrift.Protocol;
using Thrift.Protocol.Entities;
using Thrift.Protocol.Utilities;
using Thrift.Transport;
using Thrift.Transport.Client;
using Thrift.Transport.Server;
using Thrift.Processor;
#pragma warning disable IDE0079 // remove unnecessary pragmas
#pragma warning disable IDE1006 // parts of the code use IDL spelling
public partial class TPipeHeartbeatResp : TBase
{
private List<bool> _pipeCompletedList;
private List<long> _pipeRemainingEventCountList;
private List<double> _pipeRemainingTimeList;
public List<byte[]> PipeMetaList { get; set; }
public List<bool> PipeCompletedList
{
get
{
return _pipeCompletedList;
}
set
{
__isset.pipeCompletedList = true;
this._pipeCompletedList = value;
}
}
public List<long> PipeRemainingEventCountList
{
get
{
return _pipeRemainingEventCountList;
}
set
{
__isset.pipeRemainingEventCountList = true;
this._pipeRemainingEventCountList = value;
}
}
public List<double> PipeRemainingTimeList
{
get
{
return _pipeRemainingTimeList;
}
set
{
__isset.pipeRemainingTimeList = true;
this._pipeRemainingTimeList = value;
}
}
public Isset __isset;
public struct Isset
{
public bool pipeCompletedList;
public bool pipeRemainingEventCountList;
public bool pipeRemainingTimeList;
}
public TPipeHeartbeatResp()
{
}
public TPipeHeartbeatResp(List<byte[]> pipeMetaList) : this()
{
this.PipeMetaList = pipeMetaList;
}
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
try
{
bool isset_pipeMetaList = false;
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.List)
{
{
TList _list71 = await iprot.ReadListBeginAsync(cancellationToken);
PipeMetaList = new List<byte[]>(_list71.Count);
for(int _i72 = 0; _i72 < _list71.Count; ++_i72)
{
byte[] _elem73;
_elem73 = await iprot.ReadBinaryAsync(cancellationToken);
PipeMetaList.Add(_elem73);
}
await iprot.ReadListEndAsync(cancellationToken);
}
isset_pipeMetaList = true;
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 2:
if (field.Type == TType.List)
{
{
TList _list74 = await iprot.ReadListBeginAsync(cancellationToken);
PipeCompletedList = new List<bool>(_list74.Count);
for(int _i75 = 0; _i75 < _list74.Count; ++_i75)
{
bool _elem76;
_elem76 = await iprot.ReadBoolAsync(cancellationToken);
PipeCompletedList.Add(_elem76);
}
await iprot.ReadListEndAsync(cancellationToken);
}
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 3:
if (field.Type == TType.List)
{
{
TList _list77 = await iprot.ReadListBeginAsync(cancellationToken);
PipeRemainingEventCountList = new List<long>(_list77.Count);
for(int _i78 = 0; _i78 < _list77.Count; ++_i78)
{
long _elem79;
_elem79 = await iprot.ReadI64Async(cancellationToken);
PipeRemainingEventCountList.Add(_elem79);
}
await iprot.ReadListEndAsync(cancellationToken);
}
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 4:
if (field.Type == TType.List)
{
{
TList _list80 = await iprot.ReadListBeginAsync(cancellationToken);
PipeRemainingTimeList = new List<double>(_list80.Count);
for(int _i81 = 0; _i81 < _list80.Count; ++_i81)
{
double _elem82;
_elem82 = await iprot.ReadDoubleAsync(cancellationToken);
PipeRemainingTimeList.Add(_elem82);
}
await iprot.ReadListEndAsync(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);
if (!isset_pipeMetaList)
{
throw new TProtocolException(TProtocolException.INVALID_DATA);
}
}
finally
{
iprot.DecrementRecursionDepth();
}
}
public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
{
oprot.IncrementRecursionDepth();
try
{
var struc = new TStruct("TPipeHeartbeatResp");
await oprot.WriteStructBeginAsync(struc, cancellationToken);
var field = new TField();
if((PipeMetaList != null))
{
field.Name = "pipeMetaList";
field.Type = TType.List;
field.ID = 1;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.String, PipeMetaList.Count), cancellationToken);
foreach (byte[] _iter83 in PipeMetaList)
{
await oprot.WriteBinaryAsync(_iter83, cancellationToken);
}
await oprot.WriteListEndAsync(cancellationToken);
}
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((PipeCompletedList != null) && __isset.pipeCompletedList)
{
field.Name = "pipeCompletedList";
field.Type = TType.List;
field.ID = 2;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.Bool, PipeCompletedList.Count), cancellationToken);
foreach (bool _iter84 in PipeCompletedList)
{
await oprot.WriteBoolAsync(_iter84, cancellationToken);
}
await oprot.WriteListEndAsync(cancellationToken);
}
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((PipeRemainingEventCountList != null) && __isset.pipeRemainingEventCountList)
{
field.Name = "pipeRemainingEventCountList";
field.Type = TType.List;
field.ID = 3;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.I64, PipeRemainingEventCountList.Count), cancellationToken);
foreach (long _iter85 in PipeRemainingEventCountList)
{
await oprot.WriteI64Async(_iter85, cancellationToken);
}
await oprot.WriteListEndAsync(cancellationToken);
}
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((PipeRemainingTimeList != null) && __isset.pipeRemainingTimeList)
{
field.Name = "pipeRemainingTimeList";
field.Type = TType.List;
field.ID = 4;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.Double, PipeRemainingTimeList.Count), cancellationToken);
foreach (double _iter86 in PipeRemainingTimeList)
{
await oprot.WriteDoubleAsync(_iter86, cancellationToken);
}
await oprot.WriteListEndAsync(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 TPipeHeartbeatResp other)) return false;
if (ReferenceEquals(this, other)) return true;
return TCollections.Equals(PipeMetaList, other.PipeMetaList)
&& ((__isset.pipeCompletedList == other.__isset.pipeCompletedList) && ((!__isset.pipeCompletedList) || (TCollections.Equals(PipeCompletedList, other.PipeCompletedList))))
&& ((__isset.pipeRemainingEventCountList == other.__isset.pipeRemainingEventCountList) && ((!__isset.pipeRemainingEventCountList) || (TCollections.Equals(PipeRemainingEventCountList, other.PipeRemainingEventCountList))))
&& ((__isset.pipeRemainingTimeList == other.__isset.pipeRemainingTimeList) && ((!__isset.pipeRemainingTimeList) || (TCollections.Equals(PipeRemainingTimeList, other.PipeRemainingTimeList))));
}
public override int GetHashCode() {
int hashcode = 157;
unchecked {
if((PipeMetaList != null))
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(PipeMetaList);
}
if((PipeCompletedList != null) && __isset.pipeCompletedList)
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(PipeCompletedList);
}
if((PipeRemainingEventCountList != null) && __isset.pipeRemainingEventCountList)
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(PipeRemainingEventCountList);
}
if((PipeRemainingTimeList != null) && __isset.pipeRemainingTimeList)
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(PipeRemainingTimeList);
}
}
return hashcode;
}
public override string ToString()
{
var sb = new StringBuilder("TPipeHeartbeatResp(");
if((PipeMetaList != null))
{
sb.Append(", PipeMetaList: ");
PipeMetaList.ToString(sb);
}
if((PipeCompletedList != null) && __isset.pipeCompletedList)
{
sb.Append(", PipeCompletedList: ");
PipeCompletedList.ToString(sb);
}
if((PipeRemainingEventCountList != null) && __isset.pipeRemainingEventCountList)
{
sb.Append(", PipeRemainingEventCountList: ");
PipeRemainingEventCountList.ToString(sb);
}
if((PipeRemainingTimeList != null) && __isset.pipeRemainingTimeList)
{
sb.Append(", PipeRemainingTimeList: ");
PipeRemainingTimeList.ToString(sb);
}
sb.Append(')');
return sb.ToString();
}
}