blob: e833703b1d9d10368bc4cfdc015f2e630e262eac [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 TSCreateMultiTimeseriesReq : TBase
{
private List<Dictionary<string, string>> _propsList;
private List<Dictionary<string, string>> _tagsList;
private List<Dictionary<string, string>> _attributesList;
private List<string> _measurementAliasList;
public long SessionId { get; set; }
public List<string> Paths { get; set; }
public List<int> DataTypes { get; set; }
public List<int> Encodings { get; set; }
public List<int> Compressors { get; set; }
public List<Dictionary<string, string>> PropsList
{
get
{
return _propsList;
}
set
{
__isset.propsList = true;
this._propsList = value;
}
}
public List<Dictionary<string, string>> TagsList
{
get
{
return _tagsList;
}
set
{
__isset.tagsList = true;
this._tagsList = value;
}
}
public List<Dictionary<string, string>> AttributesList
{
get
{
return _attributesList;
}
set
{
__isset.attributesList = true;
this._attributesList = value;
}
}
public List<string> MeasurementAliasList
{
get
{
return _measurementAliasList;
}
set
{
__isset.measurementAliasList = true;
this._measurementAliasList = value;
}
}
public Isset __isset;
public struct Isset
{
public bool propsList;
public bool tagsList;
public bool attributesList;
public bool measurementAliasList;
}
public TSCreateMultiTimeseriesReq()
{
}
public TSCreateMultiTimeseriesReq(long sessionId, List<string> paths, List<int> dataTypes, List<int> encodings, List<int> compressors) : this()
{
this.SessionId = sessionId;
this.Paths = paths;
this.DataTypes = dataTypes;
this.Encodings = encodings;
this.Compressors = compressors;
}
public TSCreateMultiTimeseriesReq DeepCopy()
{
var tmp244 = new TSCreateMultiTimeseriesReq();
tmp244.SessionId = this.SessionId;
if((Paths != null))
{
tmp244.Paths = this.Paths.DeepCopy();
}
if((DataTypes != null))
{
tmp244.DataTypes = this.DataTypes.DeepCopy();
}
if((Encodings != null))
{
tmp244.Encodings = this.Encodings.DeepCopy();
}
if((Compressors != null))
{
tmp244.Compressors = this.Compressors.DeepCopy();
}
if((PropsList != null) && __isset.propsList)
{
tmp244.PropsList = this.PropsList.DeepCopy();
}
tmp244.__isset.propsList = this.__isset.propsList;
if((TagsList != null) && __isset.tagsList)
{
tmp244.TagsList = this.TagsList.DeepCopy();
}
tmp244.__isset.tagsList = this.__isset.tagsList;
if((AttributesList != null) && __isset.attributesList)
{
tmp244.AttributesList = this.AttributesList.DeepCopy();
}
tmp244.__isset.attributesList = this.__isset.attributesList;
if((MeasurementAliasList != null) && __isset.measurementAliasList)
{
tmp244.MeasurementAliasList = this.MeasurementAliasList.DeepCopy();
}
tmp244.__isset.measurementAliasList = this.__isset.measurementAliasList;
return tmp244;
}
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
try
{
bool isset_sessionId = false;
bool isset_paths = false;
bool isset_dataTypes = false;
bool isset_encodings = false;
bool isset_compressors = 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.I64)
{
SessionId = await iprot.ReadI64Async(cancellationToken);
isset_sessionId = true;
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 2:
if (field.Type == TType.List)
{
{
TList _list245 = await iprot.ReadListBeginAsync(cancellationToken);
Paths = new List<string>(_list245.Count);
for(int _i246 = 0; _i246 < _list245.Count; ++_i246)
{
string _elem247;
_elem247 = await iprot.ReadStringAsync(cancellationToken);
Paths.Add(_elem247);
}
await iprot.ReadListEndAsync(cancellationToken);
}
isset_paths = true;
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 3:
if (field.Type == TType.List)
{
{
TList _list248 = await iprot.ReadListBeginAsync(cancellationToken);
DataTypes = new List<int>(_list248.Count);
for(int _i249 = 0; _i249 < _list248.Count; ++_i249)
{
int _elem250;
_elem250 = await iprot.ReadI32Async(cancellationToken);
DataTypes.Add(_elem250);
}
await iprot.ReadListEndAsync(cancellationToken);
}
isset_dataTypes = true;
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 4:
if (field.Type == TType.List)
{
{
TList _list251 = await iprot.ReadListBeginAsync(cancellationToken);
Encodings = new List<int>(_list251.Count);
for(int _i252 = 0; _i252 < _list251.Count; ++_i252)
{
int _elem253;
_elem253 = await iprot.ReadI32Async(cancellationToken);
Encodings.Add(_elem253);
}
await iprot.ReadListEndAsync(cancellationToken);
}
isset_encodings = true;
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 5:
if (field.Type == TType.List)
{
{
TList _list254 = await iprot.ReadListBeginAsync(cancellationToken);
Compressors = new List<int>(_list254.Count);
for(int _i255 = 0; _i255 < _list254.Count; ++_i255)
{
int _elem256;
_elem256 = await iprot.ReadI32Async(cancellationToken);
Compressors.Add(_elem256);
}
await iprot.ReadListEndAsync(cancellationToken);
}
isset_compressors = true;
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 6:
if (field.Type == TType.List)
{
{
TList _list257 = await iprot.ReadListBeginAsync(cancellationToken);
PropsList = new List<Dictionary<string, string>>(_list257.Count);
for(int _i258 = 0; _i258 < _list257.Count; ++_i258)
{
Dictionary<string, string> _elem259;
{
TMap _map260 = await iprot.ReadMapBeginAsync(cancellationToken);
_elem259 = new Dictionary<string, string>(_map260.Count);
for(int _i261 = 0; _i261 < _map260.Count; ++_i261)
{
string _key262;
string _val263;
_key262 = await iprot.ReadStringAsync(cancellationToken);
_val263 = await iprot.ReadStringAsync(cancellationToken);
_elem259[_key262] = _val263;
}
await iprot.ReadMapEndAsync(cancellationToken);
}
PropsList.Add(_elem259);
}
await iprot.ReadListEndAsync(cancellationToken);
}
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 7:
if (field.Type == TType.List)
{
{
TList _list264 = await iprot.ReadListBeginAsync(cancellationToken);
TagsList = new List<Dictionary<string, string>>(_list264.Count);
for(int _i265 = 0; _i265 < _list264.Count; ++_i265)
{
Dictionary<string, string> _elem266;
{
TMap _map267 = await iprot.ReadMapBeginAsync(cancellationToken);
_elem266 = new Dictionary<string, string>(_map267.Count);
for(int _i268 = 0; _i268 < _map267.Count; ++_i268)
{
string _key269;
string _val270;
_key269 = await iprot.ReadStringAsync(cancellationToken);
_val270 = await iprot.ReadStringAsync(cancellationToken);
_elem266[_key269] = _val270;
}
await iprot.ReadMapEndAsync(cancellationToken);
}
TagsList.Add(_elem266);
}
await iprot.ReadListEndAsync(cancellationToken);
}
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 8:
if (field.Type == TType.List)
{
{
TList _list271 = await iprot.ReadListBeginAsync(cancellationToken);
AttributesList = new List<Dictionary<string, string>>(_list271.Count);
for(int _i272 = 0; _i272 < _list271.Count; ++_i272)
{
Dictionary<string, string> _elem273;
{
TMap _map274 = await iprot.ReadMapBeginAsync(cancellationToken);
_elem273 = new Dictionary<string, string>(_map274.Count);
for(int _i275 = 0; _i275 < _map274.Count; ++_i275)
{
string _key276;
string _val277;
_key276 = await iprot.ReadStringAsync(cancellationToken);
_val277 = await iprot.ReadStringAsync(cancellationToken);
_elem273[_key276] = _val277;
}
await iprot.ReadMapEndAsync(cancellationToken);
}
AttributesList.Add(_elem273);
}
await iprot.ReadListEndAsync(cancellationToken);
}
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 9:
if (field.Type == TType.List)
{
{
TList _list278 = await iprot.ReadListBeginAsync(cancellationToken);
MeasurementAliasList = new List<string>(_list278.Count);
for(int _i279 = 0; _i279 < _list278.Count; ++_i279)
{
string _elem280;
_elem280 = await iprot.ReadStringAsync(cancellationToken);
MeasurementAliasList.Add(_elem280);
}
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_sessionId)
{
throw new TProtocolException(TProtocolException.INVALID_DATA);
}
if (!isset_paths)
{
throw new TProtocolException(TProtocolException.INVALID_DATA);
}
if (!isset_dataTypes)
{
throw new TProtocolException(TProtocolException.INVALID_DATA);
}
if (!isset_encodings)
{
throw new TProtocolException(TProtocolException.INVALID_DATA);
}
if (!isset_compressors)
{
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("TSCreateMultiTimeseriesReq");
await oprot.WriteStructBeginAsync(struc, cancellationToken);
var field = new TField();
field.Name = "sessionId";
field.Type = TType.I64;
field.ID = 1;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
await oprot.WriteI64Async(SessionId, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
if((Paths != null))
{
field.Name = "paths";
field.Type = TType.List;
field.ID = 2;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.String, Paths.Count), cancellationToken);
foreach (string _iter281 in Paths)
{
await oprot.WriteStringAsync(_iter281, cancellationToken);
}
await oprot.WriteListEndAsync(cancellationToken);
}
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((DataTypes != null))
{
field.Name = "dataTypes";
field.Type = TType.List;
field.ID = 3;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.I32, DataTypes.Count), cancellationToken);
foreach (int _iter282 in DataTypes)
{
await oprot.WriteI32Async(_iter282, cancellationToken);
}
await oprot.WriteListEndAsync(cancellationToken);
}
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((Encodings != null))
{
field.Name = "encodings";
field.Type = TType.List;
field.ID = 4;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.I32, Encodings.Count), cancellationToken);
foreach (int _iter283 in Encodings)
{
await oprot.WriteI32Async(_iter283, cancellationToken);
}
await oprot.WriteListEndAsync(cancellationToken);
}
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((Compressors != null))
{
field.Name = "compressors";
field.Type = TType.List;
field.ID = 5;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.I32, Compressors.Count), cancellationToken);
foreach (int _iter284 in Compressors)
{
await oprot.WriteI32Async(_iter284, cancellationToken);
}
await oprot.WriteListEndAsync(cancellationToken);
}
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((PropsList != null) && __isset.propsList)
{
field.Name = "propsList";
field.Type = TType.List;
field.ID = 6;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.Map, PropsList.Count), cancellationToken);
foreach (Dictionary<string, string> _iter285 in PropsList)
{
{
await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, _iter285.Count), cancellationToken);
foreach (string _iter286 in _iter285.Keys)
{
await oprot.WriteStringAsync(_iter286, cancellationToken);
await oprot.WriteStringAsync(_iter285[_iter286], cancellationToken);
}
await oprot.WriteMapEndAsync(cancellationToken);
}
}
await oprot.WriteListEndAsync(cancellationToken);
}
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((TagsList != null) && __isset.tagsList)
{
field.Name = "tagsList";
field.Type = TType.List;
field.ID = 7;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.Map, TagsList.Count), cancellationToken);
foreach (Dictionary<string, string> _iter287 in TagsList)
{
{
await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, _iter287.Count), cancellationToken);
foreach (string _iter288 in _iter287.Keys)
{
await oprot.WriteStringAsync(_iter288, cancellationToken);
await oprot.WriteStringAsync(_iter287[_iter288], cancellationToken);
}
await oprot.WriteMapEndAsync(cancellationToken);
}
}
await oprot.WriteListEndAsync(cancellationToken);
}
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((AttributesList != null) && __isset.attributesList)
{
field.Name = "attributesList";
field.Type = TType.List;
field.ID = 8;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.Map, AttributesList.Count), cancellationToken);
foreach (Dictionary<string, string> _iter289 in AttributesList)
{
{
await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, _iter289.Count), cancellationToken);
foreach (string _iter290 in _iter289.Keys)
{
await oprot.WriteStringAsync(_iter290, cancellationToken);
await oprot.WriteStringAsync(_iter289[_iter290], cancellationToken);
}
await oprot.WriteMapEndAsync(cancellationToken);
}
}
await oprot.WriteListEndAsync(cancellationToken);
}
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((MeasurementAliasList != null) && __isset.measurementAliasList)
{
field.Name = "measurementAliasList";
field.Type = TType.List;
field.ID = 9;
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.String, MeasurementAliasList.Count), cancellationToken);
foreach (string _iter291 in MeasurementAliasList)
{
await oprot.WriteStringAsync(_iter291, 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 TSCreateMultiTimeseriesReq other)) return false;
if (ReferenceEquals(this, other)) return true;
return System.Object.Equals(SessionId, other.SessionId)
&& TCollections.Equals(Paths, other.Paths)
&& TCollections.Equals(DataTypes, other.DataTypes)
&& TCollections.Equals(Encodings, other.Encodings)
&& TCollections.Equals(Compressors, other.Compressors)
&& ((__isset.propsList == other.__isset.propsList) && ((!__isset.propsList) || (TCollections.Equals(PropsList, other.PropsList))))
&& ((__isset.tagsList == other.__isset.tagsList) && ((!__isset.tagsList) || (TCollections.Equals(TagsList, other.TagsList))))
&& ((__isset.attributesList == other.__isset.attributesList) && ((!__isset.attributesList) || (TCollections.Equals(AttributesList, other.AttributesList))))
&& ((__isset.measurementAliasList == other.__isset.measurementAliasList) && ((!__isset.measurementAliasList) || (TCollections.Equals(MeasurementAliasList, other.MeasurementAliasList))));
}
public override int GetHashCode() {
int hashcode = 157;
unchecked {
hashcode = (hashcode * 397) + SessionId.GetHashCode();
if((Paths != null))
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(Paths);
}
if((DataTypes != null))
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(DataTypes);
}
if((Encodings != null))
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(Encodings);
}
if((Compressors != null))
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(Compressors);
}
if((PropsList != null) && __isset.propsList)
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(PropsList);
}
if((TagsList != null) && __isset.tagsList)
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(TagsList);
}
if((AttributesList != null) && __isset.attributesList)
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(AttributesList);
}
if((MeasurementAliasList != null) && __isset.measurementAliasList)
{
hashcode = (hashcode * 397) + TCollections.GetHashCode(MeasurementAliasList);
}
}
return hashcode;
}
public override string ToString()
{
var sb = new StringBuilder("TSCreateMultiTimeseriesReq(");
sb.Append(", SessionId: ");
SessionId.ToString(sb);
if((Paths != null))
{
sb.Append(", Paths: ");
Paths.ToString(sb);
}
if((DataTypes != null))
{
sb.Append(", DataTypes: ");
DataTypes.ToString(sb);
}
if((Encodings != null))
{
sb.Append(", Encodings: ");
Encodings.ToString(sb);
}
if((Compressors != null))
{
sb.Append(", Compressors: ");
Compressors.ToString(sb);
}
if((PropsList != null) && __isset.propsList)
{
sb.Append(", PropsList: ");
PropsList.ToString(sb);
}
if((TagsList != null) && __isset.tagsList)
{
sb.Append(", TagsList: ");
TagsList.ToString(sb);
}
if((AttributesList != null) && __isset.attributesList)
{
sb.Append(", AttributesList: ");
AttributesList.ToString(sb);
}
if((MeasurementAliasList != null) && __isset.measurementAliasList)
{
sb.Append(", MeasurementAliasList: ");
MeasurementAliasList.ToString(sb);
}
sb.Append(')');
return sb.ToString();
}
}