| /** |
| * 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 TFlushReq : TBase |
| { |
| private string _isSeq; |
| private List<string> _storageGroups; |
| |
| public string IsSeq |
| { |
| get |
| { |
| return _isSeq; |
| } |
| set |
| { |
| __isset.isSeq = true; |
| this._isSeq = value; |
| } |
| } |
| |
| public List<string> StorageGroups |
| { |
| get |
| { |
| return _storageGroups; |
| } |
| set |
| { |
| __isset.storageGroups = true; |
| this._storageGroups = value; |
| } |
| } |
| |
| |
| public Isset __isset; |
| public struct Isset |
| { |
| public bool isSeq; |
| public bool storageGroups; |
| } |
| |
| public TFlushReq() |
| { |
| } |
| |
| public TFlushReq DeepCopy() |
| { |
| var tmp32 = new TFlushReq(); |
| if((IsSeq != null) && __isset.isSeq) |
| { |
| tmp32.IsSeq = this.IsSeq; |
| } |
| tmp32.__isset.isSeq = this.__isset.isSeq; |
| if((StorageGroups != null) && __isset.storageGroups) |
| { |
| tmp32.StorageGroups = this.StorageGroups.DeepCopy(); |
| } |
| tmp32.__isset.storageGroups = this.__isset.storageGroups; |
| return tmp32; |
| } |
| |
| 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.String) |
| { |
| IsSeq = await iprot.ReadStringAsync(cancellationToken); |
| } |
| else |
| { |
| await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); |
| } |
| break; |
| case 2: |
| if (field.Type == TType.List) |
| { |
| { |
| TList _list33 = await iprot.ReadListBeginAsync(cancellationToken); |
| StorageGroups = new List<string>(_list33.Count); |
| for(int _i34 = 0; _i34 < _list33.Count; ++_i34) |
| { |
| string _elem35; |
| _elem35 = await iprot.ReadStringAsync(cancellationToken); |
| StorageGroups.Add(_elem35); |
| } |
| 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); |
| } |
| finally |
| { |
| iprot.DecrementRecursionDepth(); |
| } |
| } |
| |
| public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) |
| { |
| oprot.IncrementRecursionDepth(); |
| try |
| { |
| var struc = new TStruct("TFlushReq"); |
| await oprot.WriteStructBeginAsync(struc, cancellationToken); |
| var field = new TField(); |
| if((IsSeq != null) && __isset.isSeq) |
| { |
| field.Name = "isSeq"; |
| field.Type = TType.String; |
| field.ID = 1; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| await oprot.WriteStringAsync(IsSeq, cancellationToken); |
| await oprot.WriteFieldEndAsync(cancellationToken); |
| } |
| if((StorageGroups != null) && __isset.storageGroups) |
| { |
| field.Name = "storageGroups"; |
| field.Type = TType.List; |
| field.ID = 2; |
| await oprot.WriteFieldBeginAsync(field, cancellationToken); |
| { |
| await oprot.WriteListBeginAsync(new TList(TType.String, StorageGroups.Count), cancellationToken); |
| foreach (string _iter36 in StorageGroups) |
| { |
| await oprot.WriteStringAsync(_iter36, 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 TFlushReq other)) return false; |
| if (ReferenceEquals(this, other)) return true; |
| return ((__isset.isSeq == other.__isset.isSeq) && ((!__isset.isSeq) || (System.Object.Equals(IsSeq, other.IsSeq)))) |
| && ((__isset.storageGroups == other.__isset.storageGroups) && ((!__isset.storageGroups) || (TCollections.Equals(StorageGroups, other.StorageGroups)))); |
| } |
| |
| public override int GetHashCode() { |
| int hashcode = 157; |
| unchecked { |
| if((IsSeq != null) && __isset.isSeq) |
| { |
| hashcode = (hashcode * 397) + IsSeq.GetHashCode(); |
| } |
| if((StorageGroups != null) && __isset.storageGroups) |
| { |
| hashcode = (hashcode * 397) + TCollections.GetHashCode(StorageGroups); |
| } |
| } |
| return hashcode; |
| } |
| |
| public override string ToString() |
| { |
| var sb = new StringBuilder("TFlushReq("); |
| int tmp37 = 0; |
| if((IsSeq != null) && __isset.isSeq) |
| { |
| if(0 < tmp37++) { sb.Append(", "); } |
| sb.Append("IsSeq: "); |
| IsSeq.ToString(sb); |
| } |
| if((StorageGroups != null) && __isset.storageGroups) |
| { |
| if(0 < tmp37++) { sb.Append(", "); } |
| sb.Append("StorageGroups: "); |
| StorageGroups.ToString(sb); |
| } |
| sb.Append(')'); |
| return sb.ToString(); |
| } |
| } |
| |