| /** |
| * Autogenerated by Thrift Compiler (0.14.2) |
| * |
| * 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 ServerProperties : TBase |
| { |
| private int _maxConcurrentClientNum; |
| private string _watermarkSecretKey; |
| private string _watermarkBitString; |
| private int _watermarkParamMarkRate; |
| private int _watermarkParamMaxRightBit; |
| private int _thriftMaxFrameSize; |
| private bool _isReadOnly; |
| |
| public string Version { get; set; } |
| |
| public List<string> SupportedTimeAggregationOperations { get; set; } |
| |
| public string TimestampPrecision { get; set; } |
| |
| public int MaxConcurrentClientNum |
| { |
| get |
| { |
| return _maxConcurrentClientNum; |
| } |
| set |
| { |
| __isset.maxConcurrentClientNum = true; |
| this._maxConcurrentClientNum = value; |
| } |
| } |
| |
| public string WatermarkSecretKey |
| { |
| get |
| { |
| return _watermarkSecretKey; |
| } |
| set |
| { |
| __isset.watermarkSecretKey = true; |
| this._watermarkSecretKey = value; |
| } |
| } |
| |
| public string WatermarkBitString |
| { |
| get |
| { |
| return _watermarkBitString; |
| } |
| set |
| { |
| __isset.watermarkBitString = true; |
| this._watermarkBitString = value; |
| } |
| } |
| |
| public int WatermarkParamMarkRate |
| { |
| get |
| { |
| return _watermarkParamMarkRate; |
| } |
| set |
| { |
| __isset.watermarkParamMarkRate = true; |
| this._watermarkParamMarkRate = value; |
| } |
| } |
| |
| public int WatermarkParamMaxRightBit |
| { |
| get |
| { |
| return _watermarkParamMaxRightBit; |
| } |
| set |
| { |
| __isset.watermarkParamMaxRightBit = true; |
| this._watermarkParamMaxRightBit = value; |
| } |
| } |
| |
| public int ThriftMaxFrameSize |
| { |
| get |
| { |
| return _thriftMaxFrameSize; |
| } |
| set |
| { |
| __isset.thriftMaxFrameSize = true; |
| this._thriftMaxFrameSize = value; |
| } |
| } |
| |
| public bool IsReadOnly |
| { |
| get |
| { |
| return _isReadOnly; |
| } |
| set |
| { |
| __isset.isReadOnly = true; |
| this._isReadOnly = value; |
| } |
| } |
| |
| |
| public Isset __isset; |
| public struct Isset |
| { |
| public bool maxConcurrentClientNum; |
| public bool watermarkSecretKey; |
| public bool watermarkBitString; |
| public bool watermarkParamMarkRate; |
| public bool watermarkParamMaxRightBit; |
| public bool thriftMaxFrameSize; |
| public bool isReadOnly; |
| } |
| |
| public ServerProperties() |
| { |
| } |
| |
| public ServerProperties(string version, List<string> supportedTimeAggregationOperations, string timestampPrecision) : this() |
| { |
| this.Version = version; |
| this.SupportedTimeAggregationOperations = supportedTimeAggregationOperations; |
| this.TimestampPrecision = timestampPrecision; |
| } |
| |
| public ServerProperties DeepCopy() |
| { |
| var tmp379 = new ServerProperties(); |
| if((Version != null)) |
| { |
| tmp379.Version = this.Version; |
| } |
| if((SupportedTimeAggregationOperations != null)) |
| { |
| tmp379.SupportedTimeAggregationOperations = this.SupportedTimeAggregationOperations.DeepCopy(); |
| } |
| if((TimestampPrecision != null)) |
| { |
| tmp379.TimestampPrecision = this.TimestampPrecision; |
| } |
| if(__isset.maxConcurrentClientNum) |
| { |
| tmp379.MaxConcurrentClientNum = this.MaxConcurrentClientNum; |
| } |
| tmp379.__isset.maxConcurrentClientNum = this.__isset.maxConcurrentClientNum; |
| if((WatermarkSecretKey != null) && __isset.watermarkSecretKey) |
| { |
| tmp379.WatermarkSecretKey = this.WatermarkSecretKey; |
| } |
| tmp379.__isset.watermarkSecretKey = this.__isset.watermarkSecretKey; |
| if((WatermarkBitString != null) && __isset.watermarkBitString) |
| { |
| tmp379.WatermarkBitString = this.WatermarkBitString; |
| } |
| tmp379.__isset.watermarkBitString = this.__isset.watermarkBitString; |
| if(__isset.watermarkParamMarkRate) |
| { |
| tmp379.WatermarkParamMarkRate = this.WatermarkParamMarkRate; |
| } |
| tmp379.__isset.watermarkParamMarkRate = this.__isset.watermarkParamMarkRate; |
| if(__isset.watermarkParamMaxRightBit) |
| { |
| tmp379.WatermarkParamMaxRightBit = this.WatermarkParamMaxRightBit; |
| } |
| tmp379.__isset.watermarkParamMaxRightBit = this.__isset.watermarkParamMaxRightBit; |
| if(__isset.thriftMaxFrameSize) |
| { |
| tmp379.ThriftMaxFrameSize = this.ThriftMaxFrameSize; |
| } |
| tmp379.__isset.thriftMaxFrameSize = this.__isset.thriftMaxFrameSize; |
| if(__isset.isReadOnly) |
| { |
| tmp379.IsReadOnly = this.IsReadOnly; |
| } |
| tmp379.__isset.isReadOnly = this.__isset.isReadOnly; |
| return tmp379; |
| } |
| |
| public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) |
| { |
| iprot.IncrementRecursionDepth(); |
| try |
| { |
| bool isset_version = false; |
| bool isset_supportedTimeAggregationOperations = false; |
| bool isset_timestampPrecision = 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.String) |
| { |
| Version = await iprot.ReadStringAsync(cancellationToken); |
| isset_version = true; |
| } |
| else |
| { |
| await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); |
| } |
| break; |
| case 2: |
| if (field.Type == TType.List) |
| { |
| { |
| TList _list380 = await iprot.ReadListBeginAsync(cancellationToken); |
| SupportedTimeAggregationOperations = new List<string>(_list380.Count); |
| for(int _i381 = 0; _i381 < _list380.Count; ++_i381) |
| { |
| string _elem382; |
| _elem382 = await iprot.ReadStringAsync(cancellationToken); |
| SupportedTimeAggregationOperations.Add(_elem382); |
| } |
| await iprot.ReadListEndAsync(cancellationToken); |
| } |
| isset_supportedTimeAggregationOperations = true; |
| } |
| else |
| { |
| await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); |
| } |
| break; |
| case 3: |
| if (field.Type == TType.String) |
| { |
| TimestampPrecision = await iprot.ReadStringAsync(cancellationToken); |
| isset_timestampPrecision = true; |
| } |
| else |
| { |
| await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); |
| } |
| break; |
| case 4: |
| if (field.Type == TType.I32) |
| { |
| MaxConcurrentClientNum = await iprot.ReadI32Async(cancellationToken); |
| } |
| else |
| { |
| await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); |
| } |
| break; |
| case 5: |
| if (field.Type == TType.String) |
| { |
| WatermarkSecretKey = await iprot.ReadStringAsync(cancellationToken); |
| } |
| else |
| { |
| await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); |
| } |
| break; |
| case 6: |
| if (field.Type == TType.String) |
| { |
| WatermarkBitString = await iprot.ReadStringAsync(cancellationToken); |
| } |
| else |
| { |
| await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); |
| } |
| break; |
| case 7: |
| if (field.Type == TType.I32) |
| { |
| WatermarkParamMarkRate = await iprot.ReadI32Async(cancellationToken); |
| } |
| else |
| { |
| await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); |
| } |
| break; |
| case 8: |
| if (field.Type == TType.I32) |
| { |
| WatermarkParamMaxRightBit = await iprot.ReadI32Async(cancellationToken); |
| } |
| else |
| { |
| await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); |
| } |
| break; |
| case 9: |
| if (field.Type == TType.I32) |
| { |
| ThriftMaxFrameSize = await iprot.ReadI32Async(cancellationToken); |
| } |
| else |
| { |
| await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); |
| } |
| break; |
| case 10: |
| if (field.Type == TType.Bool) |
| { |
| IsReadOnly = await iprot.ReadBoolAsync(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_version) |
| { |
| throw new TProtocolException(TProtocolException.INVALID_DATA); |
| } |
| if (!isset_supportedTimeAggregationOperations) |
| { |
| throw new TProtocolException(TProtocolException.INVALID_DATA); |
| } |
| if (!isset_timestampPrecision) |
| { |
| 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("ServerProperties"); |
| await oprot.WriteStructBeginAsync(struc, cancellationToken); |
| var field = new TField(); |
| if((Version != null)) |
| { |
| field.Name = "version"; |
| field.Type = TType.String; |
| field.ID = 1; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| await oprot.WriteStringAsync(Version, cancellationToken); |
| await oprot.WriteFieldEndAsync(cancellationToken); |
| } |
| if((SupportedTimeAggregationOperations != null)) |
| { |
| field.Name = "supportedTimeAggregationOperations"; |
| field.Type = TType.List; |
| field.ID = 2; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| { |
| await oprot.WriteListBeginAsync(new TList(TType.String, SupportedTimeAggregationOperations.Count), cancellationToken); |
| foreach (string _iter383 in SupportedTimeAggregationOperations) |
| { |
| await oprot.WriteStringAsync(_iter383, cancellationToken); |
| } |
| await oprot.WriteListEndAsync(cancellationToken); |
| } |
| await oprot.WriteFieldEndAsync(cancellationToken); |
| } |
| if((TimestampPrecision != null)) |
| { |
| field.Name = "timestampPrecision"; |
| field.Type = TType.String; |
| field.ID = 3; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| await oprot.WriteStringAsync(TimestampPrecision, cancellationToken); |
| await oprot.WriteFieldEndAsync(cancellationToken); |
| } |
| if(__isset.maxConcurrentClientNum) |
| { |
| field.Name = "maxConcurrentClientNum"; |
| field.Type = TType.I32; |
| field.ID = 4; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| await oprot.WriteI32Async(MaxConcurrentClientNum, cancellationToken); |
| await oprot.WriteFieldEndAsync(cancellationToken); |
| } |
| if((WatermarkSecretKey != null) && __isset.watermarkSecretKey) |
| { |
| field.Name = "watermarkSecretKey"; |
| field.Type = TType.String; |
| field.ID = 5; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| await oprot.WriteStringAsync(WatermarkSecretKey, cancellationToken); |
| await oprot.WriteFieldEndAsync(cancellationToken); |
| } |
| if((WatermarkBitString != null) && __isset.watermarkBitString) |
| { |
| field.Name = "watermarkBitString"; |
| field.Type = TType.String; |
| field.ID = 6; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| await oprot.WriteStringAsync(WatermarkBitString, cancellationToken); |
| await oprot.WriteFieldEndAsync(cancellationToken); |
| } |
| if(__isset.watermarkParamMarkRate) |
| { |
| field.Name = "watermarkParamMarkRate"; |
| field.Type = TType.I32; |
| field.ID = 7; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| await oprot.WriteI32Async(WatermarkParamMarkRate, cancellationToken); |
| await oprot.WriteFieldEndAsync(cancellationToken); |
| } |
| if(__isset.watermarkParamMaxRightBit) |
| { |
| field.Name = "watermarkParamMaxRightBit"; |
| field.Type = TType.I32; |
| field.ID = 8; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| await oprot.WriteI32Async(WatermarkParamMaxRightBit, cancellationToken); |
| await oprot.WriteFieldEndAsync(cancellationToken); |
| } |
| if(__isset.thriftMaxFrameSize) |
| { |
| field.Name = "thriftMaxFrameSize"; |
| field.Type = TType.I32; |
| field.ID = 9; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| await oprot.WriteI32Async(ThriftMaxFrameSize, cancellationToken); |
| await oprot.WriteFieldEndAsync(cancellationToken); |
| } |
| if(__isset.isReadOnly) |
| { |
| field.Name = "isReadOnly"; |
| field.Type = TType.Bool; |
| field.ID = 10; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| await oprot.WriteBoolAsync(IsReadOnly, 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 ServerProperties other)) return false; |
| if (ReferenceEquals(this, other)) return true; |
| return System.Object.Equals(Version, other.Version) |
| && TCollections.Equals(SupportedTimeAggregationOperations, other.SupportedTimeAggregationOperations) |
| && System.Object.Equals(TimestampPrecision, other.TimestampPrecision) |
| && ((__isset.maxConcurrentClientNum == other.__isset.maxConcurrentClientNum) && ((!__isset.maxConcurrentClientNum) || (System.Object.Equals(MaxConcurrentClientNum, other.MaxConcurrentClientNum)))) |
| && ((__isset.watermarkSecretKey == other.__isset.watermarkSecretKey) && ((!__isset.watermarkSecretKey) || (System.Object.Equals(WatermarkSecretKey, other.WatermarkSecretKey)))) |
| && ((__isset.watermarkBitString == other.__isset.watermarkBitString) && ((!__isset.watermarkBitString) || (System.Object.Equals(WatermarkBitString, other.WatermarkBitString)))) |
| && ((__isset.watermarkParamMarkRate == other.__isset.watermarkParamMarkRate) && ((!__isset.watermarkParamMarkRate) || (System.Object.Equals(WatermarkParamMarkRate, other.WatermarkParamMarkRate)))) |
| && ((__isset.watermarkParamMaxRightBit == other.__isset.watermarkParamMaxRightBit) && ((!__isset.watermarkParamMaxRightBit) || (System.Object.Equals(WatermarkParamMaxRightBit, other.WatermarkParamMaxRightBit)))) |
| && ((__isset.thriftMaxFrameSize == other.__isset.thriftMaxFrameSize) && ((!__isset.thriftMaxFrameSize) || (System.Object.Equals(ThriftMaxFrameSize, other.ThriftMaxFrameSize)))) |
| && ((__isset.isReadOnly == other.__isset.isReadOnly) && ((!__isset.isReadOnly) || (System.Object.Equals(IsReadOnly, other.IsReadOnly)))); |
| } |
| |
| public override int GetHashCode() { |
| int hashcode = 157; |
| unchecked { |
| if((Version != null)) |
| { |
| hashcode = (hashcode * 397) + Version.GetHashCode(); |
| } |
| if((SupportedTimeAggregationOperations != null)) |
| { |
| hashcode = (hashcode * 397) + TCollections.GetHashCode(SupportedTimeAggregationOperations); |
| } |
| if((TimestampPrecision != null)) |
| { |
| hashcode = (hashcode * 397) + TimestampPrecision.GetHashCode(); |
| } |
| if(__isset.maxConcurrentClientNum) |
| { |
| hashcode = (hashcode * 397) + MaxConcurrentClientNum.GetHashCode(); |
| } |
| if((WatermarkSecretKey != null) && __isset.watermarkSecretKey) |
| { |
| hashcode = (hashcode * 397) + WatermarkSecretKey.GetHashCode(); |
| } |
| if((WatermarkBitString != null) && __isset.watermarkBitString) |
| { |
| hashcode = (hashcode * 397) + WatermarkBitString.GetHashCode(); |
| } |
| if(__isset.watermarkParamMarkRate) |
| { |
| hashcode = (hashcode * 397) + WatermarkParamMarkRate.GetHashCode(); |
| } |
| if(__isset.watermarkParamMaxRightBit) |
| { |
| hashcode = (hashcode * 397) + WatermarkParamMaxRightBit.GetHashCode(); |
| } |
| if(__isset.thriftMaxFrameSize) |
| { |
| hashcode = (hashcode * 397) + ThriftMaxFrameSize.GetHashCode(); |
| } |
| if(__isset.isReadOnly) |
| { |
| hashcode = (hashcode * 397) + IsReadOnly.GetHashCode(); |
| } |
| } |
| return hashcode; |
| } |
| |
| public override string ToString() |
| { |
| var sb = new StringBuilder("ServerProperties("); |
| if((Version != null)) |
| { |
| sb.Append(", Version: "); |
| Version.ToString(sb); |
| } |
| if((SupportedTimeAggregationOperations != null)) |
| { |
| sb.Append(", SupportedTimeAggregationOperations: "); |
| SupportedTimeAggregationOperations.ToString(sb); |
| } |
| if((TimestampPrecision != null)) |
| { |
| sb.Append(", TimestampPrecision: "); |
| TimestampPrecision.ToString(sb); |
| } |
| if(__isset.maxConcurrentClientNum) |
| { |
| sb.Append(", MaxConcurrentClientNum: "); |
| MaxConcurrentClientNum.ToString(sb); |
| } |
| if((WatermarkSecretKey != null) && __isset.watermarkSecretKey) |
| { |
| sb.Append(", WatermarkSecretKey: "); |
| WatermarkSecretKey.ToString(sb); |
| } |
| if((WatermarkBitString != null) && __isset.watermarkBitString) |
| { |
| sb.Append(", WatermarkBitString: "); |
| WatermarkBitString.ToString(sb); |
| } |
| if(__isset.watermarkParamMarkRate) |
| { |
| sb.Append(", WatermarkParamMarkRate: "); |
| WatermarkParamMarkRate.ToString(sb); |
| } |
| if(__isset.watermarkParamMaxRightBit) |
| { |
| sb.Append(", WatermarkParamMaxRightBit: "); |
| WatermarkParamMaxRightBit.ToString(sb); |
| } |
| if(__isset.thriftMaxFrameSize) |
| { |
| sb.Append(", ThriftMaxFrameSize: "); |
| ThriftMaxFrameSize.ToString(sb); |
| } |
| if(__isset.isReadOnly) |
| { |
| sb.Append(", IsReadOnly: "); |
| IsReadOnly.ToString(sb); |
| } |
| sb.Append(')'); |
| return sb.ToString(); |
| } |
| } |
| |