mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2026-06-13 22:48:42 +00:00
RPC Test
This commit is contained in:
@@ -0,0 +1,428 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.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 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 IDE0017 // object init can be simplified
|
||||
#pragma warning disable IDE0028 // collection init can be simplified
|
||||
#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 Echo.ThriftModel
|
||||
{
|
||||
|
||||
public partial class Address : TBase
|
||||
{
|
||||
private string _line1;
|
||||
private string _line2;
|
||||
private string _city;
|
||||
private string _region;
|
||||
private string _country;
|
||||
private string _postalCode;
|
||||
|
||||
public string Line1
|
||||
{
|
||||
get
|
||||
{
|
||||
return _line1;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.line1 = true;
|
||||
this._line1 = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Line2
|
||||
{
|
||||
get
|
||||
{
|
||||
return _line2;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.line2 = true;
|
||||
this._line2 = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string City
|
||||
{
|
||||
get
|
||||
{
|
||||
return _city;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@city = true;
|
||||
this._city = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Region
|
||||
{
|
||||
get
|
||||
{
|
||||
return _region;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@region = true;
|
||||
this._region = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Country
|
||||
{
|
||||
get
|
||||
{
|
||||
return _country;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@country = true;
|
||||
this._country = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string PostalCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return _postalCode;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.postalCode = true;
|
||||
this._postalCode = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Isset __isset;
|
||||
public struct Isset
|
||||
{
|
||||
public bool line1;
|
||||
public bool line2;
|
||||
public bool @city;
|
||||
public bool @region;
|
||||
public bool @country;
|
||||
public bool postalCode;
|
||||
}
|
||||
|
||||
public Address()
|
||||
{
|
||||
}
|
||||
|
||||
public Address DeepCopy()
|
||||
{
|
||||
var tmp15 = new Address();
|
||||
if((Line1 != null) && __isset.line1)
|
||||
{
|
||||
tmp15.Line1 = this.Line1;
|
||||
}
|
||||
tmp15.__isset.line1 = this.__isset.line1;
|
||||
if((Line2 != null) && __isset.line2)
|
||||
{
|
||||
tmp15.Line2 = this.Line2;
|
||||
}
|
||||
tmp15.__isset.line2 = this.__isset.line2;
|
||||
if((City != null) && __isset.@city)
|
||||
{
|
||||
tmp15.City = this.City;
|
||||
}
|
||||
tmp15.__isset.@city = this.__isset.@city;
|
||||
if((Region != null) && __isset.@region)
|
||||
{
|
||||
tmp15.Region = this.Region;
|
||||
}
|
||||
tmp15.__isset.@region = this.__isset.@region;
|
||||
if((Country != null) && __isset.@country)
|
||||
{
|
||||
tmp15.Country = this.Country;
|
||||
}
|
||||
tmp15.__isset.@country = this.__isset.@country;
|
||||
if((PostalCode != null) && __isset.postalCode)
|
||||
{
|
||||
tmp15.PostalCode = this.PostalCode;
|
||||
}
|
||||
tmp15.__isset.postalCode = this.__isset.postalCode;
|
||||
return tmp15;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
Line1 = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
Line2 = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
City = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
Region = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
Country = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
PostalCode = await iprot.ReadStringAsync(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 tmp16 = new TStruct("Address");
|
||||
await oprot.WriteStructBeginAsync(tmp16, cancellationToken);
|
||||
var tmp17 = new TField();
|
||||
if((Line1 != null) && __isset.line1)
|
||||
{
|
||||
tmp17.Name = "line1";
|
||||
tmp17.Type = TType.String;
|
||||
tmp17.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp17, cancellationToken);
|
||||
await oprot.WriteStringAsync(Line1, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Line2 != null) && __isset.line2)
|
||||
{
|
||||
tmp17.Name = "line2";
|
||||
tmp17.Type = TType.String;
|
||||
tmp17.ID = 2;
|
||||
await oprot.WriteFieldBeginAsync(tmp17, cancellationToken);
|
||||
await oprot.WriteStringAsync(Line2, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((City != null) && __isset.@city)
|
||||
{
|
||||
tmp17.Name = "city";
|
||||
tmp17.Type = TType.String;
|
||||
tmp17.ID = 3;
|
||||
await oprot.WriteFieldBeginAsync(tmp17, cancellationToken);
|
||||
await oprot.WriteStringAsync(City, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Region != null) && __isset.@region)
|
||||
{
|
||||
tmp17.Name = "region";
|
||||
tmp17.Type = TType.String;
|
||||
tmp17.ID = 4;
|
||||
await oprot.WriteFieldBeginAsync(tmp17, cancellationToken);
|
||||
await oprot.WriteStringAsync(Region, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Country != null) && __isset.@country)
|
||||
{
|
||||
tmp17.Name = "country";
|
||||
tmp17.Type = TType.String;
|
||||
tmp17.ID = 5;
|
||||
await oprot.WriteFieldBeginAsync(tmp17, cancellationToken);
|
||||
await oprot.WriteStringAsync(Country, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((PostalCode != null) && __isset.postalCode)
|
||||
{
|
||||
tmp17.Name = "postalCode";
|
||||
tmp17.Type = TType.String;
|
||||
tmp17.ID = 6;
|
||||
await oprot.WriteFieldBeginAsync(tmp17, cancellationToken);
|
||||
await oprot.WriteStringAsync(PostalCode, 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 Address other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return ((__isset.line1 == other.__isset.line1) && ((!__isset.line1) || (global::System.Object.Equals(Line1, other.Line1))))
|
||||
&& ((__isset.line2 == other.__isset.line2) && ((!__isset.line2) || (global::System.Object.Equals(Line2, other.Line2))))
|
||||
&& ((__isset.@city == other.__isset.@city) && ((!__isset.@city) || (global::System.Object.Equals(City, other.City))))
|
||||
&& ((__isset.@region == other.__isset.@region) && ((!__isset.@region) || (global::System.Object.Equals(Region, other.Region))))
|
||||
&& ((__isset.@country == other.__isset.@country) && ((!__isset.@country) || (global::System.Object.Equals(Country, other.Country))))
|
||||
&& ((__isset.postalCode == other.__isset.postalCode) && ((!__isset.postalCode) || (global::System.Object.Equals(PostalCode, other.PostalCode))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if((Line1 != null) && __isset.line1)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Line1.GetHashCode();
|
||||
}
|
||||
if((Line2 != null) && __isset.line2)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Line2.GetHashCode();
|
||||
}
|
||||
if((City != null) && __isset.@city)
|
||||
{
|
||||
hashcode = (hashcode * 397) + City.GetHashCode();
|
||||
}
|
||||
if((Region != null) && __isset.@region)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Region.GetHashCode();
|
||||
}
|
||||
if((Country != null) && __isset.@country)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Country.GetHashCode();
|
||||
}
|
||||
if((PostalCode != null) && __isset.postalCode)
|
||||
{
|
||||
hashcode = (hashcode * 397) + PostalCode.GetHashCode();
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp18 = new StringBuilder("Address(");
|
||||
int tmp19 = 0;
|
||||
if((Line1 != null) && __isset.line1)
|
||||
{
|
||||
if(0 < tmp19++) { tmp18.Append(", "); }
|
||||
tmp18.Append("Line1: ");
|
||||
Line1.ToString(tmp18);
|
||||
}
|
||||
if((Line2 != null) && __isset.line2)
|
||||
{
|
||||
if(0 < tmp19++) { tmp18.Append(", "); }
|
||||
tmp18.Append("Line2: ");
|
||||
Line2.ToString(tmp18);
|
||||
}
|
||||
if((City != null) && __isset.@city)
|
||||
{
|
||||
if(0 < tmp19++) { tmp18.Append(", "); }
|
||||
tmp18.Append("City: ");
|
||||
City.ToString(tmp18);
|
||||
}
|
||||
if((Region != null) && __isset.@region)
|
||||
{
|
||||
if(0 < tmp19++) { tmp18.Append(", "); }
|
||||
tmp18.Append("Region: ");
|
||||
Region.ToString(tmp18);
|
||||
}
|
||||
if((Country != null) && __isset.@country)
|
||||
{
|
||||
if(0 < tmp19++) { tmp18.Append(", "); }
|
||||
tmp18.Append("Country: ");
|
||||
Country.ToString(tmp18);
|
||||
}
|
||||
if((PostalCode != null) && __isset.postalCode)
|
||||
{
|
||||
if(0 < tmp19++) { tmp18.Append(", "); }
|
||||
tmp18.Append("PostalCode: ");
|
||||
PostalCode.ToString(tmp18);
|
||||
}
|
||||
tmp18.Append(')');
|
||||
return tmp18.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.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 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 IDE0017 // object init can be simplified
|
||||
#pragma warning disable IDE0028 // collection init can be simplified
|
||||
#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 Echo.ThriftModel
|
||||
{
|
||||
|
||||
public partial class Attachment : TBase
|
||||
{
|
||||
private string _name;
|
||||
private string _mimeType;
|
||||
private byte[] _data;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@name = true;
|
||||
this._name = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string MimeType
|
||||
{
|
||||
get
|
||||
{
|
||||
return _mimeType;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.mimeType = true;
|
||||
this._mimeType = value;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] Data
|
||||
{
|
||||
get
|
||||
{
|
||||
return _data;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@data = true;
|
||||
this._data = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Isset __isset;
|
||||
public struct Isset
|
||||
{
|
||||
public bool @name;
|
||||
public bool mimeType;
|
||||
public bool @data;
|
||||
}
|
||||
|
||||
public Attachment()
|
||||
{
|
||||
}
|
||||
|
||||
public Attachment DeepCopy()
|
||||
{
|
||||
var tmp50 = new Attachment();
|
||||
if((Name != null) && __isset.@name)
|
||||
{
|
||||
tmp50.Name = this.Name;
|
||||
}
|
||||
tmp50.__isset.@name = this.__isset.@name;
|
||||
if((MimeType != null) && __isset.mimeType)
|
||||
{
|
||||
tmp50.MimeType = this.MimeType;
|
||||
}
|
||||
tmp50.__isset.mimeType = this.__isset.mimeType;
|
||||
if((Data != null) && __isset.@data)
|
||||
{
|
||||
tmp50.Data = this.Data.ToArray();
|
||||
}
|
||||
tmp50.__isset.@data = this.__isset.@data;
|
||||
return tmp50;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
Name = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
MimeType = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
Data = await iprot.ReadBinaryAsync(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 tmp51 = new TStruct("Attachment");
|
||||
await oprot.WriteStructBeginAsync(tmp51, cancellationToken);
|
||||
var tmp52 = new TField();
|
||||
if((Name != null) && __isset.@name)
|
||||
{
|
||||
tmp52.Name = "name";
|
||||
tmp52.Type = TType.String;
|
||||
tmp52.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp52, cancellationToken);
|
||||
await oprot.WriteStringAsync(Name, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((MimeType != null) && __isset.mimeType)
|
||||
{
|
||||
tmp52.Name = "mimeType";
|
||||
tmp52.Type = TType.String;
|
||||
tmp52.ID = 2;
|
||||
await oprot.WriteFieldBeginAsync(tmp52, cancellationToken);
|
||||
await oprot.WriteStringAsync(MimeType, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Data != null) && __isset.@data)
|
||||
{
|
||||
tmp52.Name = "data";
|
||||
tmp52.Type = TType.String;
|
||||
tmp52.ID = 3;
|
||||
await oprot.WriteFieldBeginAsync(tmp52, cancellationToken);
|
||||
await oprot.WriteBinaryAsync(Data, 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 Attachment other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return ((__isset.@name == other.__isset.@name) && ((!__isset.@name) || (global::System.Object.Equals(Name, other.Name))))
|
||||
&& ((__isset.mimeType == other.__isset.mimeType) && ((!__isset.mimeType) || (global::System.Object.Equals(MimeType, other.MimeType))))
|
||||
&& ((__isset.@data == other.__isset.@data) && ((!__isset.@data) || (TCollections.Equals(Data, other.Data))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if((Name != null) && __isset.@name)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Name.GetHashCode();
|
||||
}
|
||||
if((MimeType != null) && __isset.mimeType)
|
||||
{
|
||||
hashcode = (hashcode * 397) + MimeType.GetHashCode();
|
||||
}
|
||||
if((Data != null) && __isset.@data)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Data.GetHashCode();
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp53 = new StringBuilder("Attachment(");
|
||||
int tmp54 = 0;
|
||||
if((Name != null) && __isset.@name)
|
||||
{
|
||||
if(0 < tmp54++) { tmp53.Append(", "); }
|
||||
tmp53.Append("Name: ");
|
||||
Name.ToString(tmp53);
|
||||
}
|
||||
if((MimeType != null) && __isset.mimeType)
|
||||
{
|
||||
if(0 < tmp54++) { tmp53.Append(", "); }
|
||||
tmp53.Append("MimeType: ");
|
||||
MimeType.ToString(tmp53);
|
||||
}
|
||||
if((Data != null) && __isset.@data)
|
||||
{
|
||||
if(0 < tmp54++) { tmp53.Append(", "); }
|
||||
tmp53.Append("Data: ");
|
||||
Data.ToString(tmp53);
|
||||
}
|
||||
tmp53.Append(')');
|
||||
return tmp53.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,544 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.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 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 IDE0017 // object init can be simplified
|
||||
#pragma warning disable IDE0028 // collection init can be simplified
|
||||
#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 Echo.ThriftModel
|
||||
{
|
||||
|
||||
public partial class BusinessDocument : TBase
|
||||
{
|
||||
private global::Echo.ThriftModel.DocumentHeader _header;
|
||||
private global::Echo.ThriftModel.Party _seller;
|
||||
private global::Echo.ThriftModel.Party _buyer;
|
||||
private List<global::Echo.ThriftModel.LineItem> _items;
|
||||
private List<global::Echo.ThriftModel.Payment> _payments;
|
||||
private List<global::Echo.ThriftModel.Attachment> _attachments;
|
||||
private List<int> _riskScores;
|
||||
|
||||
public global::Echo.ThriftModel.DocumentHeader Header
|
||||
{
|
||||
get
|
||||
{
|
||||
return _header;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@header = true;
|
||||
this._header = value;
|
||||
}
|
||||
}
|
||||
|
||||
public global::Echo.ThriftModel.Party Seller
|
||||
{
|
||||
get
|
||||
{
|
||||
return _seller;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@seller = true;
|
||||
this._seller = value;
|
||||
}
|
||||
}
|
||||
|
||||
public global::Echo.ThriftModel.Party Buyer
|
||||
{
|
||||
get
|
||||
{
|
||||
return _buyer;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@buyer = true;
|
||||
this._buyer = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<global::Echo.ThriftModel.LineItem> Items
|
||||
{
|
||||
get
|
||||
{
|
||||
return _items;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@items = true;
|
||||
this._items = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<global::Echo.ThriftModel.Payment> Payments
|
||||
{
|
||||
get
|
||||
{
|
||||
return _payments;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@payments = true;
|
||||
this._payments = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<global::Echo.ThriftModel.Attachment> Attachments
|
||||
{
|
||||
get
|
||||
{
|
||||
return _attachments;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@attachments = true;
|
||||
this._attachments = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<int> RiskScores
|
||||
{
|
||||
get
|
||||
{
|
||||
return _riskScores;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.riskScores = true;
|
||||
this._riskScores = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Isset __isset;
|
||||
public struct Isset
|
||||
{
|
||||
public bool @header;
|
||||
public bool @seller;
|
||||
public bool @buyer;
|
||||
public bool @items;
|
||||
public bool @payments;
|
||||
public bool @attachments;
|
||||
public bool riskScores;
|
||||
}
|
||||
|
||||
public BusinessDocument()
|
||||
{
|
||||
}
|
||||
|
||||
public BusinessDocument DeepCopy()
|
||||
{
|
||||
var tmp55 = new BusinessDocument();
|
||||
if((Header != null) && __isset.@header)
|
||||
{
|
||||
tmp55.Header = (global::Echo.ThriftModel.DocumentHeader)this.Header.DeepCopy();
|
||||
}
|
||||
tmp55.__isset.@header = this.__isset.@header;
|
||||
if((Seller != null) && __isset.@seller)
|
||||
{
|
||||
tmp55.Seller = (global::Echo.ThriftModel.Party)this.Seller.DeepCopy();
|
||||
}
|
||||
tmp55.__isset.@seller = this.__isset.@seller;
|
||||
if((Buyer != null) && __isset.@buyer)
|
||||
{
|
||||
tmp55.Buyer = (global::Echo.ThriftModel.Party)this.Buyer.DeepCopy();
|
||||
}
|
||||
tmp55.__isset.@buyer = this.__isset.@buyer;
|
||||
if((Items != null) && __isset.@items)
|
||||
{
|
||||
tmp55.Items = this.Items.DeepCopy();
|
||||
}
|
||||
tmp55.__isset.@items = this.__isset.@items;
|
||||
if((Payments != null) && __isset.@payments)
|
||||
{
|
||||
tmp55.Payments = this.Payments.DeepCopy();
|
||||
}
|
||||
tmp55.__isset.@payments = this.__isset.@payments;
|
||||
if((Attachments != null) && __isset.@attachments)
|
||||
{
|
||||
tmp55.Attachments = this.Attachments.DeepCopy();
|
||||
}
|
||||
tmp55.__isset.@attachments = this.__isset.@attachments;
|
||||
if((RiskScores != null) && __isset.riskScores)
|
||||
{
|
||||
tmp55.RiskScores = this.RiskScores.DeepCopy();
|
||||
}
|
||||
tmp55.__isset.riskScores = this.__isset.riskScores;
|
||||
return tmp55;
|
||||
}
|
||||
|
||||
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.Struct)
|
||||
{
|
||||
Header = new global::Echo.ThriftModel.DocumentHeader();
|
||||
await Header.ReadAsync(iprot, cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (field.Type == TType.Struct)
|
||||
{
|
||||
Seller = new global::Echo.ThriftModel.Party();
|
||||
await Seller.ReadAsync(iprot, cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (field.Type == TType.Struct)
|
||||
{
|
||||
Buyer = new global::Echo.ThriftModel.Party();
|
||||
await Buyer.ReadAsync(iprot, cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (field.Type == TType.List)
|
||||
{
|
||||
{
|
||||
var _list56 = await iprot.ReadListBeginAsync(cancellationToken);
|
||||
Items = new List<global::Echo.ThriftModel.LineItem>(_list56.Count);
|
||||
for(int _i57 = 0; _i57 < _list56.Count; ++_i57)
|
||||
{
|
||||
global::Echo.ThriftModel.LineItem _elem58;
|
||||
_elem58 = new global::Echo.ThriftModel.LineItem();
|
||||
await _elem58.ReadAsync(iprot, cancellationToken);
|
||||
Items.Add(_elem58);
|
||||
}
|
||||
await iprot.ReadListEndAsync(cancellationToken);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (field.Type == TType.List)
|
||||
{
|
||||
{
|
||||
var _list59 = await iprot.ReadListBeginAsync(cancellationToken);
|
||||
Payments = new List<global::Echo.ThriftModel.Payment>(_list59.Count);
|
||||
for(int _i60 = 0; _i60 < _list59.Count; ++_i60)
|
||||
{
|
||||
global::Echo.ThriftModel.Payment _elem61;
|
||||
_elem61 = new global::Echo.ThriftModel.Payment();
|
||||
await _elem61.ReadAsync(iprot, cancellationToken);
|
||||
Payments.Add(_elem61);
|
||||
}
|
||||
await iprot.ReadListEndAsync(cancellationToken);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (field.Type == TType.List)
|
||||
{
|
||||
{
|
||||
var _list62 = await iprot.ReadListBeginAsync(cancellationToken);
|
||||
Attachments = new List<global::Echo.ThriftModel.Attachment>(_list62.Count);
|
||||
for(int _i63 = 0; _i63 < _list62.Count; ++_i63)
|
||||
{
|
||||
global::Echo.ThriftModel.Attachment _elem64;
|
||||
_elem64 = new global::Echo.ThriftModel.Attachment();
|
||||
await _elem64.ReadAsync(iprot, cancellationToken);
|
||||
Attachments.Add(_elem64);
|
||||
}
|
||||
await iprot.ReadListEndAsync(cancellationToken);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (field.Type == TType.List)
|
||||
{
|
||||
{
|
||||
var _list65 = await iprot.ReadListBeginAsync(cancellationToken);
|
||||
RiskScores = new List<int>(_list65.Count);
|
||||
for(int _i66 = 0; _i66 < _list65.Count; ++_i66)
|
||||
{
|
||||
int _elem67;
|
||||
_elem67 = await iprot.ReadI32Async(cancellationToken);
|
||||
RiskScores.Add(_elem67);
|
||||
}
|
||||
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 tmp68 = new TStruct("BusinessDocument");
|
||||
await oprot.WriteStructBeginAsync(tmp68, cancellationToken);
|
||||
var tmp69 = new TField();
|
||||
if((Header != null) && __isset.@header)
|
||||
{
|
||||
tmp69.Name = "header";
|
||||
tmp69.Type = TType.Struct;
|
||||
tmp69.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp69, cancellationToken);
|
||||
await Header.WriteAsync(oprot, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Seller != null) && __isset.@seller)
|
||||
{
|
||||
tmp69.Name = "seller";
|
||||
tmp69.Type = TType.Struct;
|
||||
tmp69.ID = 2;
|
||||
await oprot.WriteFieldBeginAsync(tmp69, cancellationToken);
|
||||
await Seller.WriteAsync(oprot, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Buyer != null) && __isset.@buyer)
|
||||
{
|
||||
tmp69.Name = "buyer";
|
||||
tmp69.Type = TType.Struct;
|
||||
tmp69.ID = 3;
|
||||
await oprot.WriteFieldBeginAsync(tmp69, cancellationToken);
|
||||
await Buyer.WriteAsync(oprot, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Items != null) && __isset.@items)
|
||||
{
|
||||
tmp69.Name = "items";
|
||||
tmp69.Type = TType.List;
|
||||
tmp69.ID = 4;
|
||||
await oprot.WriteFieldBeginAsync(tmp69, cancellationToken);
|
||||
await oprot.WriteListBeginAsync(new TList(TType.Struct, Items.Count), cancellationToken);
|
||||
foreach (global::Echo.ThriftModel.LineItem _iter70 in Items)
|
||||
{
|
||||
await _iter70.WriteAsync(oprot, cancellationToken);
|
||||
}
|
||||
await oprot.WriteListEndAsync(cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Payments != null) && __isset.@payments)
|
||||
{
|
||||
tmp69.Name = "payments";
|
||||
tmp69.Type = TType.List;
|
||||
tmp69.ID = 5;
|
||||
await oprot.WriteFieldBeginAsync(tmp69, cancellationToken);
|
||||
await oprot.WriteListBeginAsync(new TList(TType.Struct, Payments.Count), cancellationToken);
|
||||
foreach (global::Echo.ThriftModel.Payment _iter71 in Payments)
|
||||
{
|
||||
await _iter71.WriteAsync(oprot, cancellationToken);
|
||||
}
|
||||
await oprot.WriteListEndAsync(cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Attachments != null) && __isset.@attachments)
|
||||
{
|
||||
tmp69.Name = "attachments";
|
||||
tmp69.Type = TType.List;
|
||||
tmp69.ID = 6;
|
||||
await oprot.WriteFieldBeginAsync(tmp69, cancellationToken);
|
||||
await oprot.WriteListBeginAsync(new TList(TType.Struct, Attachments.Count), cancellationToken);
|
||||
foreach (global::Echo.ThriftModel.Attachment _iter72 in Attachments)
|
||||
{
|
||||
await _iter72.WriteAsync(oprot, cancellationToken);
|
||||
}
|
||||
await oprot.WriteListEndAsync(cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((RiskScores != null) && __isset.riskScores)
|
||||
{
|
||||
tmp69.Name = "riskScores";
|
||||
tmp69.Type = TType.List;
|
||||
tmp69.ID = 7;
|
||||
await oprot.WriteFieldBeginAsync(tmp69, cancellationToken);
|
||||
await oprot.WriteListBeginAsync(new TList(TType.I32, RiskScores.Count), cancellationToken);
|
||||
foreach (int _iter73 in RiskScores)
|
||||
{
|
||||
await oprot.WriteI32Async(_iter73, 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 BusinessDocument other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return ((__isset.@header == other.__isset.@header) && ((!__isset.@header) || (global::System.Object.Equals(Header, other.Header))))
|
||||
&& ((__isset.@seller == other.__isset.@seller) && ((!__isset.@seller) || (global::System.Object.Equals(Seller, other.Seller))))
|
||||
&& ((__isset.@buyer == other.__isset.@buyer) && ((!__isset.@buyer) || (global::System.Object.Equals(Buyer, other.Buyer))))
|
||||
&& ((__isset.@items == other.__isset.@items) && ((!__isset.@items) || (TCollections.Equals(Items, other.Items))))
|
||||
&& ((__isset.@payments == other.__isset.@payments) && ((!__isset.@payments) || (TCollections.Equals(Payments, other.Payments))))
|
||||
&& ((__isset.@attachments == other.__isset.@attachments) && ((!__isset.@attachments) || (TCollections.Equals(Attachments, other.Attachments))))
|
||||
&& ((__isset.riskScores == other.__isset.riskScores) && ((!__isset.riskScores) || (TCollections.Equals(RiskScores, other.RiskScores))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if((Header != null) && __isset.@header)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Header.GetHashCode();
|
||||
}
|
||||
if((Seller != null) && __isset.@seller)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Seller.GetHashCode();
|
||||
}
|
||||
if((Buyer != null) && __isset.@buyer)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Buyer.GetHashCode();
|
||||
}
|
||||
if((Items != null) && __isset.@items)
|
||||
{
|
||||
hashcode = (hashcode * 397) + TCollections.GetHashCode(Items);
|
||||
}
|
||||
if((Payments != null) && __isset.@payments)
|
||||
{
|
||||
hashcode = (hashcode * 397) + TCollections.GetHashCode(Payments);
|
||||
}
|
||||
if((Attachments != null) && __isset.@attachments)
|
||||
{
|
||||
hashcode = (hashcode * 397) + TCollections.GetHashCode(Attachments);
|
||||
}
|
||||
if((RiskScores != null) && __isset.riskScores)
|
||||
{
|
||||
hashcode = (hashcode * 397) + TCollections.GetHashCode(RiskScores);
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp74 = new StringBuilder("BusinessDocument(");
|
||||
int tmp75 = 0;
|
||||
if((Header != null) && __isset.@header)
|
||||
{
|
||||
if(0 < tmp75++) { tmp74.Append(", "); }
|
||||
tmp74.Append("Header: ");
|
||||
Header.ToString(tmp74);
|
||||
}
|
||||
if((Seller != null) && __isset.@seller)
|
||||
{
|
||||
if(0 < tmp75++) { tmp74.Append(", "); }
|
||||
tmp74.Append("Seller: ");
|
||||
Seller.ToString(tmp74);
|
||||
}
|
||||
if((Buyer != null) && __isset.@buyer)
|
||||
{
|
||||
if(0 < tmp75++) { tmp74.Append(", "); }
|
||||
tmp74.Append("Buyer: ");
|
||||
Buyer.ToString(tmp74);
|
||||
}
|
||||
if((Items != null) && __isset.@items)
|
||||
{
|
||||
if(0 < tmp75++) { tmp74.Append(", "); }
|
||||
tmp74.Append("Items: ");
|
||||
Items.ToString(tmp74);
|
||||
}
|
||||
if((Payments != null) && __isset.@payments)
|
||||
{
|
||||
if(0 < tmp75++) { tmp74.Append(", "); }
|
||||
tmp74.Append("Payments: ");
|
||||
Payments.ToString(tmp74);
|
||||
}
|
||||
if((Attachments != null) && __isset.@attachments)
|
||||
{
|
||||
if(0 < tmp75++) { tmp74.Append(", "); }
|
||||
tmp74.Append("Attachments: ");
|
||||
Attachments.ToString(tmp74);
|
||||
}
|
||||
if((RiskScores != null) && __isset.riskScores)
|
||||
{
|
||||
if(0 < tmp75++) { tmp74.Append(", "); }
|
||||
tmp74.Append("RiskScores: ");
|
||||
RiskScores.ToString(tmp74);
|
||||
}
|
||||
tmp74.Append(')');
|
||||
return tmp74.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.0)
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* </auto-generated>
|
||||
*/
|
||||
|
||||
#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 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 Echo.ThriftModel
|
||||
{
|
||||
public enum Currency
|
||||
{
|
||||
IQD = 0,
|
||||
CNH = 1,
|
||||
USD = 2,
|
||||
EUR = 3,
|
||||
JPY = 4,
|
||||
GBP = 5,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.0)
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* </auto-generated>
|
||||
*/
|
||||
|
||||
#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 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 Echo.ThriftModel
|
||||
{
|
||||
public enum DocType
|
||||
{
|
||||
Quote = 0,
|
||||
Order = 1,
|
||||
Invoice = 2,
|
||||
CreditNote = 3,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,555 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.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 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 IDE0017 // object init can be simplified
|
||||
#pragma warning disable IDE0028 // collection init can be simplified
|
||||
#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 Echo.ThriftModel
|
||||
{
|
||||
|
||||
public partial class DocumentHeader : TBase
|
||||
{
|
||||
private byte[] _docId;
|
||||
private global::Echo.ThriftModel.DocType _type;
|
||||
private int _version;
|
||||
private long _createdAt;
|
||||
private long _updatedAt;
|
||||
private global::Echo.ThriftModel.Currency _currency;
|
||||
private string _notes;
|
||||
private Dictionary<string, global::Echo.ThriftModel.Variant> _meta;
|
||||
|
||||
public byte[] DocId
|
||||
{
|
||||
get
|
||||
{
|
||||
return _docId;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.docId = true;
|
||||
this._docId = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// <seealso cref="global::Echo.ThriftModel.DocType"/>
|
||||
/// </summary>
|
||||
public global::Echo.ThriftModel.DocType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return _type;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@type = true;
|
||||
this._type = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return _version;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@version = true;
|
||||
this._version = value;
|
||||
}
|
||||
}
|
||||
|
||||
public long CreatedAt
|
||||
{
|
||||
get
|
||||
{
|
||||
return _createdAt;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.createdAt = true;
|
||||
this._createdAt = value;
|
||||
}
|
||||
}
|
||||
|
||||
public long UpdatedAt
|
||||
{
|
||||
get
|
||||
{
|
||||
return _updatedAt;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.updatedAt = true;
|
||||
this._updatedAt = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// <seealso cref="global::Echo.ThriftModel.Currency"/>
|
||||
/// </summary>
|
||||
public global::Echo.ThriftModel.Currency Currency
|
||||
{
|
||||
get
|
||||
{
|
||||
return _currency;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@currency = true;
|
||||
this._currency = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Notes
|
||||
{
|
||||
get
|
||||
{
|
||||
return _notes;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@notes = true;
|
||||
this._notes = value;
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, global::Echo.ThriftModel.Variant> Meta
|
||||
{
|
||||
get
|
||||
{
|
||||
return _meta;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@meta = true;
|
||||
this._meta = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Isset __isset;
|
||||
public struct Isset
|
||||
{
|
||||
public bool docId;
|
||||
public bool @type;
|
||||
public bool @version;
|
||||
public bool createdAt;
|
||||
public bool updatedAt;
|
||||
public bool @currency;
|
||||
public bool @notes;
|
||||
public bool @meta;
|
||||
}
|
||||
|
||||
public DocumentHeader()
|
||||
{
|
||||
}
|
||||
|
||||
public DocumentHeader DeepCopy()
|
||||
{
|
||||
var tmp25 = new DocumentHeader();
|
||||
if((DocId != null) && __isset.docId)
|
||||
{
|
||||
tmp25.DocId = this.DocId.ToArray();
|
||||
}
|
||||
tmp25.__isset.docId = this.__isset.docId;
|
||||
if(__isset.@type)
|
||||
{
|
||||
tmp25.Type = this.Type;
|
||||
}
|
||||
tmp25.__isset.@type = this.__isset.@type;
|
||||
if(__isset.@version)
|
||||
{
|
||||
tmp25.Version = this.Version;
|
||||
}
|
||||
tmp25.__isset.@version = this.__isset.@version;
|
||||
if(__isset.createdAt)
|
||||
{
|
||||
tmp25.CreatedAt = this.CreatedAt;
|
||||
}
|
||||
tmp25.__isset.createdAt = this.__isset.createdAt;
|
||||
if(__isset.updatedAt)
|
||||
{
|
||||
tmp25.UpdatedAt = this.UpdatedAt;
|
||||
}
|
||||
tmp25.__isset.updatedAt = this.__isset.updatedAt;
|
||||
if(__isset.@currency)
|
||||
{
|
||||
tmp25.Currency = this.Currency;
|
||||
}
|
||||
tmp25.__isset.@currency = this.__isset.@currency;
|
||||
if((Notes != null) && __isset.@notes)
|
||||
{
|
||||
tmp25.Notes = this.Notes;
|
||||
}
|
||||
tmp25.__isset.@notes = this.__isset.@notes;
|
||||
if((Meta != null) && __isset.@meta)
|
||||
{
|
||||
tmp25.Meta = this.Meta.DeepCopy();
|
||||
}
|
||||
tmp25.__isset.@meta = this.__isset.@meta;
|
||||
return tmp25;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
DocId = await iprot.ReadBinaryAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (field.Type == TType.I32)
|
||||
{
|
||||
Type = (global::Echo.ThriftModel.DocType)await iprot.ReadI32Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (field.Type == TType.I32)
|
||||
{
|
||||
Version = await iprot.ReadI32Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (field.Type == TType.I64)
|
||||
{
|
||||
CreatedAt = await iprot.ReadI64Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (field.Type == TType.I64)
|
||||
{
|
||||
UpdatedAt = await iprot.ReadI64Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (field.Type == TType.I32)
|
||||
{
|
||||
Currency = (global::Echo.ThriftModel.Currency)await iprot.ReadI32Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
Notes = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (field.Type == TType.Map)
|
||||
{
|
||||
{
|
||||
var _map26 = await iprot.ReadMapBeginAsync(cancellationToken);
|
||||
Meta = new Dictionary<string, global::Echo.ThriftModel.Variant>(_map26.Count);
|
||||
for(int _i27 = 0; _i27 < _map26.Count; ++_i27)
|
||||
{
|
||||
string _key28;
|
||||
global::Echo.ThriftModel.Variant _val29;
|
||||
_key28 = await iprot.ReadStringAsync(cancellationToken);
|
||||
_val29 = new global::Echo.ThriftModel.Variant();
|
||||
await _val29.ReadAsync(iprot, cancellationToken);
|
||||
Meta[_key28] = _val29;
|
||||
}
|
||||
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 tmp30 = new TStruct("DocumentHeader");
|
||||
await oprot.WriteStructBeginAsync(tmp30, cancellationToken);
|
||||
var tmp31 = new TField();
|
||||
if((DocId != null) && __isset.docId)
|
||||
{
|
||||
tmp31.Name = "docId";
|
||||
tmp31.Type = TType.String;
|
||||
tmp31.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp31, cancellationToken);
|
||||
await oprot.WriteBinaryAsync(DocId, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.@type)
|
||||
{
|
||||
tmp31.Name = "type";
|
||||
tmp31.Type = TType.I32;
|
||||
tmp31.ID = 2;
|
||||
await oprot.WriteFieldBeginAsync(tmp31, cancellationToken);
|
||||
await oprot.WriteI32Async((int)Type, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.@version)
|
||||
{
|
||||
tmp31.Name = "version";
|
||||
tmp31.Type = TType.I32;
|
||||
tmp31.ID = 3;
|
||||
await oprot.WriteFieldBeginAsync(tmp31, cancellationToken);
|
||||
await oprot.WriteI32Async(Version, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.createdAt)
|
||||
{
|
||||
tmp31.Name = "createdAt";
|
||||
tmp31.Type = TType.I64;
|
||||
tmp31.ID = 4;
|
||||
await oprot.WriteFieldBeginAsync(tmp31, cancellationToken);
|
||||
await oprot.WriteI64Async(CreatedAt, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.updatedAt)
|
||||
{
|
||||
tmp31.Name = "updatedAt";
|
||||
tmp31.Type = TType.I64;
|
||||
tmp31.ID = 5;
|
||||
await oprot.WriteFieldBeginAsync(tmp31, cancellationToken);
|
||||
await oprot.WriteI64Async(UpdatedAt, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.@currency)
|
||||
{
|
||||
tmp31.Name = "currency";
|
||||
tmp31.Type = TType.I32;
|
||||
tmp31.ID = 6;
|
||||
await oprot.WriteFieldBeginAsync(tmp31, cancellationToken);
|
||||
await oprot.WriteI32Async((int)Currency, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Notes != null) && __isset.@notes)
|
||||
{
|
||||
tmp31.Name = "notes";
|
||||
tmp31.Type = TType.String;
|
||||
tmp31.ID = 7;
|
||||
await oprot.WriteFieldBeginAsync(tmp31, cancellationToken);
|
||||
await oprot.WriteStringAsync(Notes, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Meta != null) && __isset.@meta)
|
||||
{
|
||||
tmp31.Name = "meta";
|
||||
tmp31.Type = TType.Map;
|
||||
tmp31.ID = 8;
|
||||
await oprot.WriteFieldBeginAsync(tmp31, cancellationToken);
|
||||
await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.Struct, Meta.Count), cancellationToken);
|
||||
foreach (string _iter32 in Meta.Keys)
|
||||
{
|
||||
await oprot.WriteStringAsync(_iter32, cancellationToken);
|
||||
await Meta[_iter32].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 DocumentHeader other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return ((__isset.docId == other.__isset.docId) && ((!__isset.docId) || (TCollections.Equals(DocId, other.DocId))))
|
||||
&& ((__isset.@type == other.__isset.@type) && ((!__isset.@type) || (global::System.Object.Equals(Type, other.Type))))
|
||||
&& ((__isset.@version == other.__isset.@version) && ((!__isset.@version) || (global::System.Object.Equals(Version, other.Version))))
|
||||
&& ((__isset.createdAt == other.__isset.createdAt) && ((!__isset.createdAt) || (global::System.Object.Equals(CreatedAt, other.CreatedAt))))
|
||||
&& ((__isset.updatedAt == other.__isset.updatedAt) && ((!__isset.updatedAt) || (global::System.Object.Equals(UpdatedAt, other.UpdatedAt))))
|
||||
&& ((__isset.@currency == other.__isset.@currency) && ((!__isset.@currency) || (global::System.Object.Equals(Currency, other.Currency))))
|
||||
&& ((__isset.@notes == other.__isset.@notes) && ((!__isset.@notes) || (global::System.Object.Equals(Notes, other.Notes))))
|
||||
&& ((__isset.@meta == other.__isset.@meta) && ((!__isset.@meta) || (TCollections.Equals(Meta, other.Meta))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if((DocId != null) && __isset.docId)
|
||||
{
|
||||
hashcode = (hashcode * 397) + DocId.GetHashCode();
|
||||
}
|
||||
if(__isset.@type)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Type.GetHashCode();
|
||||
}
|
||||
if(__isset.@version)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Version.GetHashCode();
|
||||
}
|
||||
if(__isset.createdAt)
|
||||
{
|
||||
hashcode = (hashcode * 397) + CreatedAt.GetHashCode();
|
||||
}
|
||||
if(__isset.updatedAt)
|
||||
{
|
||||
hashcode = (hashcode * 397) + UpdatedAt.GetHashCode();
|
||||
}
|
||||
if(__isset.@currency)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Currency.GetHashCode();
|
||||
}
|
||||
if((Notes != null) && __isset.@notes)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Notes.GetHashCode();
|
||||
}
|
||||
if((Meta != null) && __isset.@meta)
|
||||
{
|
||||
hashcode = (hashcode * 397) + TCollections.GetHashCode(Meta);
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp33 = new StringBuilder("DocumentHeader(");
|
||||
int tmp34 = 0;
|
||||
if((DocId != null) && __isset.docId)
|
||||
{
|
||||
if(0 < tmp34++) { tmp33.Append(", "); }
|
||||
tmp33.Append("DocId: ");
|
||||
DocId.ToString(tmp33);
|
||||
}
|
||||
if(__isset.@type)
|
||||
{
|
||||
if(0 < tmp34++) { tmp33.Append(", "); }
|
||||
tmp33.Append("Type: ");
|
||||
Type.ToString(tmp33);
|
||||
}
|
||||
if(__isset.@version)
|
||||
{
|
||||
if(0 < tmp34++) { tmp33.Append(", "); }
|
||||
tmp33.Append("Version: ");
|
||||
Version.ToString(tmp33);
|
||||
}
|
||||
if(__isset.createdAt)
|
||||
{
|
||||
if(0 < tmp34++) { tmp33.Append(", "); }
|
||||
tmp33.Append("CreatedAt: ");
|
||||
CreatedAt.ToString(tmp33);
|
||||
}
|
||||
if(__isset.updatedAt)
|
||||
{
|
||||
if(0 < tmp34++) { tmp33.Append(", "); }
|
||||
tmp33.Append("UpdatedAt: ");
|
||||
UpdatedAt.ToString(tmp33);
|
||||
}
|
||||
if(__isset.@currency)
|
||||
{
|
||||
if(0 < tmp34++) { tmp33.Append(", "); }
|
||||
tmp33.Append("Currency: ");
|
||||
Currency.ToString(tmp33);
|
||||
}
|
||||
if((Notes != null) && __isset.@notes)
|
||||
{
|
||||
if(0 < tmp34++) { tmp33.Append(", "); }
|
||||
tmp33.Append("Notes: ");
|
||||
Notes.ToString(tmp33);
|
||||
}
|
||||
if((Meta != null) && __isset.@meta)
|
||||
{
|
||||
if(0 < tmp34++) { tmp33.Append(", "); }
|
||||
tmp33.Append("Meta: ");
|
||||
Meta.ToString(tmp33);
|
||||
}
|
||||
tmp33.Append(')');
|
||||
return tmp33.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,229 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.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 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 IDE0017 // object init can be simplified
|
||||
#pragma warning disable IDE0028 // collection init can be simplified
|
||||
#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 Echo.ThriftModel
|
||||
{
|
||||
|
||||
public partial class ExtEntry : TBase
|
||||
{
|
||||
private string _key;
|
||||
private global::Echo.ThriftModel.Variant _value;
|
||||
|
||||
public string Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return _key;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@key = true;
|
||||
this._key = value;
|
||||
}
|
||||
}
|
||||
|
||||
public global::Echo.ThriftModel.Variant Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@value = true;
|
||||
this._value = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Isset __isset;
|
||||
public struct Isset
|
||||
{
|
||||
public bool @key;
|
||||
public bool @value;
|
||||
}
|
||||
|
||||
public ExtEntry()
|
||||
{
|
||||
}
|
||||
|
||||
public ExtEntry DeepCopy()
|
||||
{
|
||||
var tmp10 = new ExtEntry();
|
||||
if((Key != null) && __isset.@key)
|
||||
{
|
||||
tmp10.Key = this.Key;
|
||||
}
|
||||
tmp10.__isset.@key = this.__isset.@key;
|
||||
if((Value != null) && __isset.@value)
|
||||
{
|
||||
tmp10.Value = (global::Echo.ThriftModel.Variant)this.Value.DeepCopy();
|
||||
}
|
||||
tmp10.__isset.@value = this.__isset.@value;
|
||||
return tmp10;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
Key = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (field.Type == TType.Struct)
|
||||
{
|
||||
Value = new global::Echo.ThriftModel.Variant();
|
||||
await Value.ReadAsync(iprot, 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 tmp11 = new TStruct("ExtEntry");
|
||||
await oprot.WriteStructBeginAsync(tmp11, cancellationToken);
|
||||
var tmp12 = new TField();
|
||||
if((Key != null) && __isset.@key)
|
||||
{
|
||||
tmp12.Name = "key";
|
||||
tmp12.Type = TType.String;
|
||||
tmp12.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp12, cancellationToken);
|
||||
await oprot.WriteStringAsync(Key, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Value != null) && __isset.@value)
|
||||
{
|
||||
tmp12.Name = "value";
|
||||
tmp12.Type = TType.Struct;
|
||||
tmp12.ID = 2;
|
||||
await oprot.WriteFieldBeginAsync(tmp12, cancellationToken);
|
||||
await Value.WriteAsync(oprot, 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 ExtEntry other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return ((__isset.@key == other.__isset.@key) && ((!__isset.@key) || (global::System.Object.Equals(Key, other.Key))))
|
||||
&& ((__isset.@value == other.__isset.@value) && ((!__isset.@value) || (global::System.Object.Equals(Value, other.Value))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if((Key != null) && __isset.@key)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Key.GetHashCode();
|
||||
}
|
||||
if((Value != null) && __isset.@value)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Value.GetHashCode();
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp13 = new StringBuilder("ExtEntry(");
|
||||
int tmp14 = 0;
|
||||
if((Key != null) && __isset.@key)
|
||||
{
|
||||
if(0 < tmp14++) { tmp13.Append(", "); }
|
||||
tmp13.Append("Key: ");
|
||||
Key.ToString(tmp13);
|
||||
}
|
||||
if((Value != null) && __isset.@value)
|
||||
{
|
||||
if(0 < tmp14++) { tmp13.Append(", "); }
|
||||
tmp13.Append("Value: ");
|
||||
Value.ToString(tmp13);
|
||||
}
|
||||
tmp13.Append(')');
|
||||
return tmp13.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.0)
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* </auto-generated>
|
||||
*/
|
||||
|
||||
#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 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 Echo.ThriftModel
|
||||
{
|
||||
public enum Kind
|
||||
{
|
||||
@Null = 0,
|
||||
@Bool = 1,
|
||||
Int64 = 2,
|
||||
UInt64 = 3,
|
||||
@Double = 4,
|
||||
@Decimal = 5,
|
||||
@String = 6,
|
||||
Bytes = 7,
|
||||
DateTime = 8,
|
||||
Guid = 9,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,651 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.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 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 IDE0017 // object init can be simplified
|
||||
#pragma warning disable IDE0028 // collection init can be simplified
|
||||
#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 Echo.ThriftModel
|
||||
{
|
||||
|
||||
public partial class LineItem : TBase
|
||||
{
|
||||
private int _lineNo;
|
||||
private global::Echo.ThriftModel.LineType _type;
|
||||
private string _sku;
|
||||
private string _description;
|
||||
private double _qty;
|
||||
private string _qtyUnit;
|
||||
private double _unitPrice;
|
||||
private double _vatRate;
|
||||
private double _discount;
|
||||
private Dictionary<string, global::Echo.ThriftModel.Variant> _ext;
|
||||
|
||||
public int LineNo
|
||||
{
|
||||
get
|
||||
{
|
||||
return _lineNo;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.lineNo = true;
|
||||
this._lineNo = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// <seealso cref="global::Echo.ThriftModel.LineType"/>
|
||||
/// </summary>
|
||||
public global::Echo.ThriftModel.LineType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return _type;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@type = true;
|
||||
this._type = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Sku
|
||||
{
|
||||
get
|
||||
{
|
||||
return _sku;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@sku = true;
|
||||
this._sku = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return _description;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@description = true;
|
||||
this._description = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double Qty
|
||||
{
|
||||
get
|
||||
{
|
||||
return _qty;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@qty = true;
|
||||
this._qty = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string QtyUnit
|
||||
{
|
||||
get
|
||||
{
|
||||
return _qtyUnit;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.qtyUnit = true;
|
||||
this._qtyUnit = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double UnitPrice
|
||||
{
|
||||
get
|
||||
{
|
||||
return _unitPrice;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.unitPrice = true;
|
||||
this._unitPrice = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double VatRate
|
||||
{
|
||||
get
|
||||
{
|
||||
return _vatRate;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.vatRate = true;
|
||||
this._vatRate = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double Discount
|
||||
{
|
||||
get
|
||||
{
|
||||
return _discount;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@discount = true;
|
||||
this._discount = value;
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, global::Echo.ThriftModel.Variant> Ext
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ext;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@ext = true;
|
||||
this._ext = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Isset __isset;
|
||||
public struct Isset
|
||||
{
|
||||
public bool lineNo;
|
||||
public bool @type;
|
||||
public bool @sku;
|
||||
public bool @description;
|
||||
public bool @qty;
|
||||
public bool qtyUnit;
|
||||
public bool unitPrice;
|
||||
public bool vatRate;
|
||||
public bool @discount;
|
||||
public bool @ext;
|
||||
}
|
||||
|
||||
public LineItem()
|
||||
{
|
||||
}
|
||||
|
||||
public LineItem DeepCopy()
|
||||
{
|
||||
var tmp35 = new LineItem();
|
||||
if(__isset.lineNo)
|
||||
{
|
||||
tmp35.LineNo = this.LineNo;
|
||||
}
|
||||
tmp35.__isset.lineNo = this.__isset.lineNo;
|
||||
if(__isset.@type)
|
||||
{
|
||||
tmp35.Type = this.Type;
|
||||
}
|
||||
tmp35.__isset.@type = this.__isset.@type;
|
||||
if((Sku != null) && __isset.@sku)
|
||||
{
|
||||
tmp35.Sku = this.Sku;
|
||||
}
|
||||
tmp35.__isset.@sku = this.__isset.@sku;
|
||||
if((Description != null) && __isset.@description)
|
||||
{
|
||||
tmp35.Description = this.Description;
|
||||
}
|
||||
tmp35.__isset.@description = this.__isset.@description;
|
||||
if(__isset.@qty)
|
||||
{
|
||||
tmp35.Qty = this.Qty;
|
||||
}
|
||||
tmp35.__isset.@qty = this.__isset.@qty;
|
||||
if((QtyUnit != null) && __isset.qtyUnit)
|
||||
{
|
||||
tmp35.QtyUnit = this.QtyUnit;
|
||||
}
|
||||
tmp35.__isset.qtyUnit = this.__isset.qtyUnit;
|
||||
if(__isset.unitPrice)
|
||||
{
|
||||
tmp35.UnitPrice = this.UnitPrice;
|
||||
}
|
||||
tmp35.__isset.unitPrice = this.__isset.unitPrice;
|
||||
if(__isset.vatRate)
|
||||
{
|
||||
tmp35.VatRate = this.VatRate;
|
||||
}
|
||||
tmp35.__isset.vatRate = this.__isset.vatRate;
|
||||
if(__isset.@discount)
|
||||
{
|
||||
tmp35.Discount = this.Discount;
|
||||
}
|
||||
tmp35.__isset.@discount = this.__isset.@discount;
|
||||
if((Ext != null) && __isset.@ext)
|
||||
{
|
||||
tmp35.Ext = this.Ext.DeepCopy();
|
||||
}
|
||||
tmp35.__isset.@ext = this.__isset.@ext;
|
||||
return tmp35;
|
||||
}
|
||||
|
||||
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.I32)
|
||||
{
|
||||
LineNo = await iprot.ReadI32Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (field.Type == TType.I32)
|
||||
{
|
||||
Type = (global::Echo.ThriftModel.LineType)await iprot.ReadI32Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
Sku = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
Description = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (field.Type == TType.Double)
|
||||
{
|
||||
Qty = await iprot.ReadDoubleAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
QtyUnit = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (field.Type == TType.Double)
|
||||
{
|
||||
UnitPrice = await iprot.ReadDoubleAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (field.Type == TType.Double)
|
||||
{
|
||||
VatRate = await iprot.ReadDoubleAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (field.Type == TType.Double)
|
||||
{
|
||||
Discount = await iprot.ReadDoubleAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (field.Type == TType.Map)
|
||||
{
|
||||
{
|
||||
var _map36 = await iprot.ReadMapBeginAsync(cancellationToken);
|
||||
Ext = new Dictionary<string, global::Echo.ThriftModel.Variant>(_map36.Count);
|
||||
for(int _i37 = 0; _i37 < _map36.Count; ++_i37)
|
||||
{
|
||||
string _key38;
|
||||
global::Echo.ThriftModel.Variant _val39;
|
||||
_key38 = await iprot.ReadStringAsync(cancellationToken);
|
||||
_val39 = new global::Echo.ThriftModel.Variant();
|
||||
await _val39.ReadAsync(iprot, cancellationToken);
|
||||
Ext[_key38] = _val39;
|
||||
}
|
||||
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 tmp40 = new TStruct("LineItem");
|
||||
await oprot.WriteStructBeginAsync(tmp40, cancellationToken);
|
||||
var tmp41 = new TField();
|
||||
if(__isset.lineNo)
|
||||
{
|
||||
tmp41.Name = "lineNo";
|
||||
tmp41.Type = TType.I32;
|
||||
tmp41.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp41, cancellationToken);
|
||||
await oprot.WriteI32Async(LineNo, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.@type)
|
||||
{
|
||||
tmp41.Name = "type";
|
||||
tmp41.Type = TType.I32;
|
||||
tmp41.ID = 2;
|
||||
await oprot.WriteFieldBeginAsync(tmp41, cancellationToken);
|
||||
await oprot.WriteI32Async((int)Type, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Sku != null) && __isset.@sku)
|
||||
{
|
||||
tmp41.Name = "sku";
|
||||
tmp41.Type = TType.String;
|
||||
tmp41.ID = 3;
|
||||
await oprot.WriteFieldBeginAsync(tmp41, cancellationToken);
|
||||
await oprot.WriteStringAsync(Sku, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Description != null) && __isset.@description)
|
||||
{
|
||||
tmp41.Name = "description";
|
||||
tmp41.Type = TType.String;
|
||||
tmp41.ID = 4;
|
||||
await oprot.WriteFieldBeginAsync(tmp41, cancellationToken);
|
||||
await oprot.WriteStringAsync(Description, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.@qty)
|
||||
{
|
||||
tmp41.Name = "qty";
|
||||
tmp41.Type = TType.Double;
|
||||
tmp41.ID = 5;
|
||||
await oprot.WriteFieldBeginAsync(tmp41, cancellationToken);
|
||||
await oprot.WriteDoubleAsync(Qty, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((QtyUnit != null) && __isset.qtyUnit)
|
||||
{
|
||||
tmp41.Name = "qtyUnit";
|
||||
tmp41.Type = TType.String;
|
||||
tmp41.ID = 6;
|
||||
await oprot.WriteFieldBeginAsync(tmp41, cancellationToken);
|
||||
await oprot.WriteStringAsync(QtyUnit, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.unitPrice)
|
||||
{
|
||||
tmp41.Name = "unitPrice";
|
||||
tmp41.Type = TType.Double;
|
||||
tmp41.ID = 7;
|
||||
await oprot.WriteFieldBeginAsync(tmp41, cancellationToken);
|
||||
await oprot.WriteDoubleAsync(UnitPrice, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.vatRate)
|
||||
{
|
||||
tmp41.Name = "vatRate";
|
||||
tmp41.Type = TType.Double;
|
||||
tmp41.ID = 8;
|
||||
await oprot.WriteFieldBeginAsync(tmp41, cancellationToken);
|
||||
await oprot.WriteDoubleAsync(VatRate, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.@discount)
|
||||
{
|
||||
tmp41.Name = "discount";
|
||||
tmp41.Type = TType.Double;
|
||||
tmp41.ID = 9;
|
||||
await oprot.WriteFieldBeginAsync(tmp41, cancellationToken);
|
||||
await oprot.WriteDoubleAsync(Discount, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Ext != null) && __isset.@ext)
|
||||
{
|
||||
tmp41.Name = "ext";
|
||||
tmp41.Type = TType.Map;
|
||||
tmp41.ID = 10;
|
||||
await oprot.WriteFieldBeginAsync(tmp41, cancellationToken);
|
||||
await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.Struct, Ext.Count), cancellationToken);
|
||||
foreach (string _iter42 in Ext.Keys)
|
||||
{
|
||||
await oprot.WriteStringAsync(_iter42, cancellationToken);
|
||||
await Ext[_iter42].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 LineItem other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return ((__isset.lineNo == other.__isset.lineNo) && ((!__isset.lineNo) || (global::System.Object.Equals(LineNo, other.LineNo))))
|
||||
&& ((__isset.@type == other.__isset.@type) && ((!__isset.@type) || (global::System.Object.Equals(Type, other.Type))))
|
||||
&& ((__isset.@sku == other.__isset.@sku) && ((!__isset.@sku) || (global::System.Object.Equals(Sku, other.Sku))))
|
||||
&& ((__isset.@description == other.__isset.@description) && ((!__isset.@description) || (global::System.Object.Equals(Description, other.Description))))
|
||||
&& ((__isset.@qty == other.__isset.@qty) && ((!__isset.@qty) || (global::System.Object.Equals(Qty, other.Qty))))
|
||||
&& ((__isset.qtyUnit == other.__isset.qtyUnit) && ((!__isset.qtyUnit) || (global::System.Object.Equals(QtyUnit, other.QtyUnit))))
|
||||
&& ((__isset.unitPrice == other.__isset.unitPrice) && ((!__isset.unitPrice) || (global::System.Object.Equals(UnitPrice, other.UnitPrice))))
|
||||
&& ((__isset.vatRate == other.__isset.vatRate) && ((!__isset.vatRate) || (global::System.Object.Equals(VatRate, other.VatRate))))
|
||||
&& ((__isset.@discount == other.__isset.@discount) && ((!__isset.@discount) || (global::System.Object.Equals(Discount, other.Discount))))
|
||||
&& ((__isset.@ext == other.__isset.@ext) && ((!__isset.@ext) || (TCollections.Equals(Ext, other.Ext))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if(__isset.lineNo)
|
||||
{
|
||||
hashcode = (hashcode * 397) + LineNo.GetHashCode();
|
||||
}
|
||||
if(__isset.@type)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Type.GetHashCode();
|
||||
}
|
||||
if((Sku != null) && __isset.@sku)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Sku.GetHashCode();
|
||||
}
|
||||
if((Description != null) && __isset.@description)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Description.GetHashCode();
|
||||
}
|
||||
if(__isset.@qty)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Qty.GetHashCode();
|
||||
}
|
||||
if((QtyUnit != null) && __isset.qtyUnit)
|
||||
{
|
||||
hashcode = (hashcode * 397) + QtyUnit.GetHashCode();
|
||||
}
|
||||
if(__isset.unitPrice)
|
||||
{
|
||||
hashcode = (hashcode * 397) + UnitPrice.GetHashCode();
|
||||
}
|
||||
if(__isset.vatRate)
|
||||
{
|
||||
hashcode = (hashcode * 397) + VatRate.GetHashCode();
|
||||
}
|
||||
if(__isset.@discount)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Discount.GetHashCode();
|
||||
}
|
||||
if((Ext != null) && __isset.@ext)
|
||||
{
|
||||
hashcode = (hashcode * 397) + TCollections.GetHashCode(Ext);
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp43 = new StringBuilder("LineItem(");
|
||||
int tmp44 = 0;
|
||||
if(__isset.lineNo)
|
||||
{
|
||||
if(0 < tmp44++) { tmp43.Append(", "); }
|
||||
tmp43.Append("LineNo: ");
|
||||
LineNo.ToString(tmp43);
|
||||
}
|
||||
if(__isset.@type)
|
||||
{
|
||||
if(0 < tmp44++) { tmp43.Append(", "); }
|
||||
tmp43.Append("Type: ");
|
||||
Type.ToString(tmp43);
|
||||
}
|
||||
if((Sku != null) && __isset.@sku)
|
||||
{
|
||||
if(0 < tmp44++) { tmp43.Append(", "); }
|
||||
tmp43.Append("Sku: ");
|
||||
Sku.ToString(tmp43);
|
||||
}
|
||||
if((Description != null) && __isset.@description)
|
||||
{
|
||||
if(0 < tmp44++) { tmp43.Append(", "); }
|
||||
tmp43.Append("Description: ");
|
||||
Description.ToString(tmp43);
|
||||
}
|
||||
if(__isset.@qty)
|
||||
{
|
||||
if(0 < tmp44++) { tmp43.Append(", "); }
|
||||
tmp43.Append("Qty: ");
|
||||
Qty.ToString(tmp43);
|
||||
}
|
||||
if((QtyUnit != null) && __isset.qtyUnit)
|
||||
{
|
||||
if(0 < tmp44++) { tmp43.Append(", "); }
|
||||
tmp43.Append("QtyUnit: ");
|
||||
QtyUnit.ToString(tmp43);
|
||||
}
|
||||
if(__isset.unitPrice)
|
||||
{
|
||||
if(0 < tmp44++) { tmp43.Append(", "); }
|
||||
tmp43.Append("UnitPrice: ");
|
||||
UnitPrice.ToString(tmp43);
|
||||
}
|
||||
if(__isset.vatRate)
|
||||
{
|
||||
if(0 < tmp44++) { tmp43.Append(", "); }
|
||||
tmp43.Append("VatRate: ");
|
||||
VatRate.ToString(tmp43);
|
||||
}
|
||||
if(__isset.@discount)
|
||||
{
|
||||
if(0 < tmp44++) { tmp43.Append(", "); }
|
||||
tmp43.Append("Discount: ");
|
||||
Discount.ToString(tmp43);
|
||||
}
|
||||
if((Ext != null) && __isset.@ext)
|
||||
{
|
||||
if(0 < tmp44++) { tmp43.Append(", "); }
|
||||
tmp43.Append("Ext: ");
|
||||
Ext.ToString(tmp43);
|
||||
}
|
||||
tmp43.Append(')');
|
||||
return tmp43.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.0)
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* </auto-generated>
|
||||
*/
|
||||
|
||||
#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 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 Echo.ThriftModel
|
||||
{
|
||||
public enum LineType
|
||||
{
|
||||
Product = 0,
|
||||
Service = 1,
|
||||
Discount = 2,
|
||||
Shipping = 3,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.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 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 IDE0017 // object init can be simplified
|
||||
#pragma warning disable IDE0028 // collection init can be simplified
|
||||
#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 Echo.ThriftModel
|
||||
{
|
||||
|
||||
public partial class MetaEntry : TBase
|
||||
{
|
||||
private string _key;
|
||||
private global::Echo.ThriftModel.Variant _value;
|
||||
|
||||
public string Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return _key;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@key = true;
|
||||
this._key = value;
|
||||
}
|
||||
}
|
||||
|
||||
public global::Echo.ThriftModel.Variant Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@value = true;
|
||||
this._value = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Isset __isset;
|
||||
public struct Isset
|
||||
{
|
||||
public bool @key;
|
||||
public bool @value;
|
||||
}
|
||||
|
||||
public MetaEntry()
|
||||
{
|
||||
}
|
||||
|
||||
public MetaEntry DeepCopy()
|
||||
{
|
||||
var tmp5 = new MetaEntry();
|
||||
if((Key != null) && __isset.@key)
|
||||
{
|
||||
tmp5.Key = this.Key;
|
||||
}
|
||||
tmp5.__isset.@key = this.__isset.@key;
|
||||
if((Value != null) && __isset.@value)
|
||||
{
|
||||
tmp5.Value = (global::Echo.ThriftModel.Variant)this.Value.DeepCopy();
|
||||
}
|
||||
tmp5.__isset.@value = this.__isset.@value;
|
||||
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.String)
|
||||
{
|
||||
Key = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (field.Type == TType.Struct)
|
||||
{
|
||||
Value = new global::Echo.ThriftModel.Variant();
|
||||
await Value.ReadAsync(iprot, 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 tmp6 = new TStruct("MetaEntry");
|
||||
await oprot.WriteStructBeginAsync(tmp6, cancellationToken);
|
||||
var tmp7 = new TField();
|
||||
if((Key != null) && __isset.@key)
|
||||
{
|
||||
tmp7.Name = "key";
|
||||
tmp7.Type = TType.String;
|
||||
tmp7.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp7, cancellationToken);
|
||||
await oprot.WriteStringAsync(Key, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Value != null) && __isset.@value)
|
||||
{
|
||||
tmp7.Name = "value";
|
||||
tmp7.Type = TType.Struct;
|
||||
tmp7.ID = 2;
|
||||
await oprot.WriteFieldBeginAsync(tmp7, cancellationToken);
|
||||
await Value.WriteAsync(oprot, 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 MetaEntry other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return ((__isset.@key == other.__isset.@key) && ((!__isset.@key) || (global::System.Object.Equals(Key, other.Key))))
|
||||
&& ((__isset.@value == other.__isset.@value) && ((!__isset.@value) || (global::System.Object.Equals(Value, other.Value))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if((Key != null) && __isset.@key)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Key.GetHashCode();
|
||||
}
|
||||
if((Value != null) && __isset.@value)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Value.GetHashCode();
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp8 = new StringBuilder("MetaEntry(");
|
||||
int tmp9 = 0;
|
||||
if((Key != null) && __isset.@key)
|
||||
{
|
||||
if(0 < tmp9++) { tmp8.Append(", "); }
|
||||
tmp8.Append("Key: ");
|
||||
Key.ToString(tmp8);
|
||||
}
|
||||
if((Value != null) && __isset.@value)
|
||||
{
|
||||
if(0 < tmp9++) { tmp8.Append(", "); }
|
||||
tmp8.Append("Value: ");
|
||||
Value.ToString(tmp8);
|
||||
}
|
||||
tmp8.Append(')');
|
||||
return tmp8.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,479 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.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 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 IDE0017 // object init can be simplified
|
||||
#pragma warning disable IDE0028 // collection init can be simplified
|
||||
#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 Echo.ThriftModel
|
||||
{
|
||||
|
||||
public partial class Party : TBase
|
||||
{
|
||||
private long _id;
|
||||
private string _name;
|
||||
private string _taxId;
|
||||
private string _email;
|
||||
private string _phone;
|
||||
private global::Echo.ThriftModel.Address _address;
|
||||
private string _preferredLanguage;
|
||||
|
||||
public long Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return _id;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@id = true;
|
||||
this._id = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@name = true;
|
||||
this._name = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string TaxId
|
||||
{
|
||||
get
|
||||
{
|
||||
return _taxId;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.taxId = true;
|
||||
this._taxId = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Email
|
||||
{
|
||||
get
|
||||
{
|
||||
return _email;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@email = true;
|
||||
this._email = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Phone
|
||||
{
|
||||
get
|
||||
{
|
||||
return _phone;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@phone = true;
|
||||
this._phone = value;
|
||||
}
|
||||
}
|
||||
|
||||
public global::Echo.ThriftModel.Address Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return _address;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@address = true;
|
||||
this._address = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string PreferredLanguage
|
||||
{
|
||||
get
|
||||
{
|
||||
return _preferredLanguage;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.preferredLanguage = true;
|
||||
this._preferredLanguage = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Isset __isset;
|
||||
public struct Isset
|
||||
{
|
||||
public bool @id;
|
||||
public bool @name;
|
||||
public bool taxId;
|
||||
public bool @email;
|
||||
public bool @phone;
|
||||
public bool @address;
|
||||
public bool preferredLanguage;
|
||||
}
|
||||
|
||||
public Party()
|
||||
{
|
||||
}
|
||||
|
||||
public Party DeepCopy()
|
||||
{
|
||||
var tmp20 = new Party();
|
||||
if(__isset.@id)
|
||||
{
|
||||
tmp20.Id = this.Id;
|
||||
}
|
||||
tmp20.__isset.@id = this.__isset.@id;
|
||||
if((Name != null) && __isset.@name)
|
||||
{
|
||||
tmp20.Name = this.Name;
|
||||
}
|
||||
tmp20.__isset.@name = this.__isset.@name;
|
||||
if((TaxId != null) && __isset.taxId)
|
||||
{
|
||||
tmp20.TaxId = this.TaxId;
|
||||
}
|
||||
tmp20.__isset.taxId = this.__isset.taxId;
|
||||
if((Email != null) && __isset.@email)
|
||||
{
|
||||
tmp20.Email = this.Email;
|
||||
}
|
||||
tmp20.__isset.@email = this.__isset.@email;
|
||||
if((Phone != null) && __isset.@phone)
|
||||
{
|
||||
tmp20.Phone = this.Phone;
|
||||
}
|
||||
tmp20.__isset.@phone = this.__isset.@phone;
|
||||
if((Address != null) && __isset.@address)
|
||||
{
|
||||
tmp20.Address = (global::Echo.ThriftModel.Address)this.Address.DeepCopy();
|
||||
}
|
||||
tmp20.__isset.@address = this.__isset.@address;
|
||||
if((PreferredLanguage != null) && __isset.preferredLanguage)
|
||||
{
|
||||
tmp20.PreferredLanguage = this.PreferredLanguage;
|
||||
}
|
||||
tmp20.__isset.preferredLanguage = this.__isset.preferredLanguage;
|
||||
return tmp20;
|
||||
}
|
||||
|
||||
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.I64)
|
||||
{
|
||||
Id = await iprot.ReadI64Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
Name = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
TaxId = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
Email = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
Phone = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (field.Type == TType.Struct)
|
||||
{
|
||||
Address = new global::Echo.ThriftModel.Address();
|
||||
await Address.ReadAsync(iprot, cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
PreferredLanguage = await iprot.ReadStringAsync(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 tmp21 = new TStruct("Party");
|
||||
await oprot.WriteStructBeginAsync(tmp21, cancellationToken);
|
||||
var tmp22 = new TField();
|
||||
if(__isset.@id)
|
||||
{
|
||||
tmp22.Name = "id";
|
||||
tmp22.Type = TType.I64;
|
||||
tmp22.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
|
||||
await oprot.WriteI64Async(Id, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Name != null) && __isset.@name)
|
||||
{
|
||||
tmp22.Name = "name";
|
||||
tmp22.Type = TType.String;
|
||||
tmp22.ID = 2;
|
||||
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
|
||||
await oprot.WriteStringAsync(Name, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((TaxId != null) && __isset.taxId)
|
||||
{
|
||||
tmp22.Name = "taxId";
|
||||
tmp22.Type = TType.String;
|
||||
tmp22.ID = 3;
|
||||
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
|
||||
await oprot.WriteStringAsync(TaxId, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Email != null) && __isset.@email)
|
||||
{
|
||||
tmp22.Name = "email";
|
||||
tmp22.Type = TType.String;
|
||||
tmp22.ID = 4;
|
||||
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
|
||||
await oprot.WriteStringAsync(Email, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Phone != null) && __isset.@phone)
|
||||
{
|
||||
tmp22.Name = "phone";
|
||||
tmp22.Type = TType.String;
|
||||
tmp22.ID = 5;
|
||||
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
|
||||
await oprot.WriteStringAsync(Phone, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Address != null) && __isset.@address)
|
||||
{
|
||||
tmp22.Name = "address";
|
||||
tmp22.Type = TType.Struct;
|
||||
tmp22.ID = 6;
|
||||
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
|
||||
await Address.WriteAsync(oprot, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((PreferredLanguage != null) && __isset.preferredLanguage)
|
||||
{
|
||||
tmp22.Name = "preferredLanguage";
|
||||
tmp22.Type = TType.String;
|
||||
tmp22.ID = 7;
|
||||
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
|
||||
await oprot.WriteStringAsync(PreferredLanguage, 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 Party other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return ((__isset.@id == other.__isset.@id) && ((!__isset.@id) || (global::System.Object.Equals(Id, other.Id))))
|
||||
&& ((__isset.@name == other.__isset.@name) && ((!__isset.@name) || (global::System.Object.Equals(Name, other.Name))))
|
||||
&& ((__isset.taxId == other.__isset.taxId) && ((!__isset.taxId) || (global::System.Object.Equals(TaxId, other.TaxId))))
|
||||
&& ((__isset.@email == other.__isset.@email) && ((!__isset.@email) || (global::System.Object.Equals(Email, other.Email))))
|
||||
&& ((__isset.@phone == other.__isset.@phone) && ((!__isset.@phone) || (global::System.Object.Equals(Phone, other.Phone))))
|
||||
&& ((__isset.@address == other.__isset.@address) && ((!__isset.@address) || (global::System.Object.Equals(Address, other.Address))))
|
||||
&& ((__isset.preferredLanguage == other.__isset.preferredLanguage) && ((!__isset.preferredLanguage) || (global::System.Object.Equals(PreferredLanguage, other.PreferredLanguage))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if(__isset.@id)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Id.GetHashCode();
|
||||
}
|
||||
if((Name != null) && __isset.@name)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Name.GetHashCode();
|
||||
}
|
||||
if((TaxId != null) && __isset.taxId)
|
||||
{
|
||||
hashcode = (hashcode * 397) + TaxId.GetHashCode();
|
||||
}
|
||||
if((Email != null) && __isset.@email)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Email.GetHashCode();
|
||||
}
|
||||
if((Phone != null) && __isset.@phone)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Phone.GetHashCode();
|
||||
}
|
||||
if((Address != null) && __isset.@address)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Address.GetHashCode();
|
||||
}
|
||||
if((PreferredLanguage != null) && __isset.preferredLanguage)
|
||||
{
|
||||
hashcode = (hashcode * 397) + PreferredLanguage.GetHashCode();
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp23 = new StringBuilder("Party(");
|
||||
int tmp24 = 0;
|
||||
if(__isset.@id)
|
||||
{
|
||||
if(0 < tmp24++) { tmp23.Append(", "); }
|
||||
tmp23.Append("Id: ");
|
||||
Id.ToString(tmp23);
|
||||
}
|
||||
if((Name != null) && __isset.@name)
|
||||
{
|
||||
if(0 < tmp24++) { tmp23.Append(", "); }
|
||||
tmp23.Append("Name: ");
|
||||
Name.ToString(tmp23);
|
||||
}
|
||||
if((TaxId != null) && __isset.taxId)
|
||||
{
|
||||
if(0 < tmp24++) { tmp23.Append(", "); }
|
||||
tmp23.Append("TaxId: ");
|
||||
TaxId.ToString(tmp23);
|
||||
}
|
||||
if((Email != null) && __isset.@email)
|
||||
{
|
||||
if(0 < tmp24++) { tmp23.Append(", "); }
|
||||
tmp23.Append("Email: ");
|
||||
Email.ToString(tmp23);
|
||||
}
|
||||
if((Phone != null) && __isset.@phone)
|
||||
{
|
||||
if(0 < tmp24++) { tmp23.Append(", "); }
|
||||
tmp23.Append("Phone: ");
|
||||
Phone.ToString(tmp23);
|
||||
}
|
||||
if((Address != null) && __isset.@address)
|
||||
{
|
||||
if(0 < tmp24++) { tmp23.Append(", "); }
|
||||
tmp23.Append("Address: ");
|
||||
Address.ToString(tmp23);
|
||||
}
|
||||
if((PreferredLanguage != null) && __isset.preferredLanguage)
|
||||
{
|
||||
if(0 < tmp24++) { tmp23.Append(", "); }
|
||||
tmp23.Append("PreferredLanguage: ");
|
||||
PreferredLanguage.ToString(tmp23);
|
||||
}
|
||||
tmp23.Append(')');
|
||||
return tmp23.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,436 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.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 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 IDE0017 // object init can be simplified
|
||||
#pragma warning disable IDE0028 // collection init can be simplified
|
||||
#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 Echo.ThriftModel
|
||||
{
|
||||
|
||||
public partial class Payment : TBase
|
||||
{
|
||||
private global::Echo.ThriftModel.PaymentMethod _method;
|
||||
private double _amount;
|
||||
private string _reference;
|
||||
private long _timestamp;
|
||||
private double _fee;
|
||||
private global::Echo.ThriftModel.Currency _currency;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// <seealso cref="global::Echo.ThriftModel.PaymentMethod"/>
|
||||
/// </summary>
|
||||
public global::Echo.ThriftModel.PaymentMethod Method
|
||||
{
|
||||
get
|
||||
{
|
||||
return _method;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@method = true;
|
||||
this._method = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double Amount
|
||||
{
|
||||
get
|
||||
{
|
||||
return _amount;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@amount = true;
|
||||
this._amount = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Reference
|
||||
{
|
||||
get
|
||||
{
|
||||
return _reference;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@reference = true;
|
||||
this._reference = value;
|
||||
}
|
||||
}
|
||||
|
||||
public long Timestamp
|
||||
{
|
||||
get
|
||||
{
|
||||
return _timestamp;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@timestamp = true;
|
||||
this._timestamp = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double Fee
|
||||
{
|
||||
get
|
||||
{
|
||||
return _fee;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@fee = true;
|
||||
this._fee = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// <seealso cref="global::Echo.ThriftModel.Currency"/>
|
||||
/// </summary>
|
||||
public global::Echo.ThriftModel.Currency Currency
|
||||
{
|
||||
get
|
||||
{
|
||||
return _currency;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@currency = true;
|
||||
this._currency = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Isset __isset;
|
||||
public struct Isset
|
||||
{
|
||||
public bool @method;
|
||||
public bool @amount;
|
||||
public bool @reference;
|
||||
public bool @timestamp;
|
||||
public bool @fee;
|
||||
public bool @currency;
|
||||
}
|
||||
|
||||
public Payment()
|
||||
{
|
||||
}
|
||||
|
||||
public Payment DeepCopy()
|
||||
{
|
||||
var tmp45 = new Payment();
|
||||
if(__isset.@method)
|
||||
{
|
||||
tmp45.Method = this.Method;
|
||||
}
|
||||
tmp45.__isset.@method = this.__isset.@method;
|
||||
if(__isset.@amount)
|
||||
{
|
||||
tmp45.Amount = this.Amount;
|
||||
}
|
||||
tmp45.__isset.@amount = this.__isset.@amount;
|
||||
if((Reference != null) && __isset.@reference)
|
||||
{
|
||||
tmp45.Reference = this.Reference;
|
||||
}
|
||||
tmp45.__isset.@reference = this.__isset.@reference;
|
||||
if(__isset.@timestamp)
|
||||
{
|
||||
tmp45.Timestamp = this.Timestamp;
|
||||
}
|
||||
tmp45.__isset.@timestamp = this.__isset.@timestamp;
|
||||
if(__isset.@fee)
|
||||
{
|
||||
tmp45.Fee = this.Fee;
|
||||
}
|
||||
tmp45.__isset.@fee = this.__isset.@fee;
|
||||
if(__isset.@currency)
|
||||
{
|
||||
tmp45.Currency = this.Currency;
|
||||
}
|
||||
tmp45.__isset.@currency = this.__isset.@currency;
|
||||
return tmp45;
|
||||
}
|
||||
|
||||
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.I32)
|
||||
{
|
||||
Method = (global::Echo.ThriftModel.PaymentMethod)await iprot.ReadI32Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (field.Type == TType.Double)
|
||||
{
|
||||
Amount = await iprot.ReadDoubleAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
Reference = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (field.Type == TType.I64)
|
||||
{
|
||||
Timestamp = await iprot.ReadI64Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (field.Type == TType.Double)
|
||||
{
|
||||
Fee = await iprot.ReadDoubleAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (field.Type == TType.I32)
|
||||
{
|
||||
Currency = (global::Echo.ThriftModel.Currency)await iprot.ReadI32Async(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 tmp46 = new TStruct("Payment");
|
||||
await oprot.WriteStructBeginAsync(tmp46, cancellationToken);
|
||||
var tmp47 = new TField();
|
||||
if(__isset.@method)
|
||||
{
|
||||
tmp47.Name = "method";
|
||||
tmp47.Type = TType.I32;
|
||||
tmp47.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp47, cancellationToken);
|
||||
await oprot.WriteI32Async((int)Method, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.@amount)
|
||||
{
|
||||
tmp47.Name = "amount";
|
||||
tmp47.Type = TType.Double;
|
||||
tmp47.ID = 2;
|
||||
await oprot.WriteFieldBeginAsync(tmp47, cancellationToken);
|
||||
await oprot.WriteDoubleAsync(Amount, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((Reference != null) && __isset.@reference)
|
||||
{
|
||||
tmp47.Name = "reference";
|
||||
tmp47.Type = TType.String;
|
||||
tmp47.ID = 3;
|
||||
await oprot.WriteFieldBeginAsync(tmp47, cancellationToken);
|
||||
await oprot.WriteStringAsync(Reference, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.@timestamp)
|
||||
{
|
||||
tmp47.Name = "timestamp";
|
||||
tmp47.Type = TType.I64;
|
||||
tmp47.ID = 4;
|
||||
await oprot.WriteFieldBeginAsync(tmp47, cancellationToken);
|
||||
await oprot.WriteI64Async(Timestamp, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.@fee)
|
||||
{
|
||||
tmp47.Name = "fee";
|
||||
tmp47.Type = TType.Double;
|
||||
tmp47.ID = 5;
|
||||
await oprot.WriteFieldBeginAsync(tmp47, cancellationToken);
|
||||
await oprot.WriteDoubleAsync(Fee, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.@currency)
|
||||
{
|
||||
tmp47.Name = "currency";
|
||||
tmp47.Type = TType.I32;
|
||||
tmp47.ID = 6;
|
||||
await oprot.WriteFieldBeginAsync(tmp47, cancellationToken);
|
||||
await oprot.WriteI32Async((int)Currency, 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 Payment other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return ((__isset.@method == other.__isset.@method) && ((!__isset.@method) || (global::System.Object.Equals(Method, other.Method))))
|
||||
&& ((__isset.@amount == other.__isset.@amount) && ((!__isset.@amount) || (global::System.Object.Equals(Amount, other.Amount))))
|
||||
&& ((__isset.@reference == other.__isset.@reference) && ((!__isset.@reference) || (global::System.Object.Equals(Reference, other.Reference))))
|
||||
&& ((__isset.@timestamp == other.__isset.@timestamp) && ((!__isset.@timestamp) || (global::System.Object.Equals(Timestamp, other.Timestamp))))
|
||||
&& ((__isset.@fee == other.__isset.@fee) && ((!__isset.@fee) || (global::System.Object.Equals(Fee, other.Fee))))
|
||||
&& ((__isset.@currency == other.__isset.@currency) && ((!__isset.@currency) || (global::System.Object.Equals(Currency, other.Currency))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if(__isset.@method)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Method.GetHashCode();
|
||||
}
|
||||
if(__isset.@amount)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Amount.GetHashCode();
|
||||
}
|
||||
if((Reference != null) && __isset.@reference)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Reference.GetHashCode();
|
||||
}
|
||||
if(__isset.@timestamp)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Timestamp.GetHashCode();
|
||||
}
|
||||
if(__isset.@fee)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Fee.GetHashCode();
|
||||
}
|
||||
if(__isset.@currency)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Currency.GetHashCode();
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp48 = new StringBuilder("Payment(");
|
||||
int tmp49 = 0;
|
||||
if(__isset.@method)
|
||||
{
|
||||
if(0 < tmp49++) { tmp48.Append(", "); }
|
||||
tmp48.Append("Method: ");
|
||||
Method.ToString(tmp48);
|
||||
}
|
||||
if(__isset.@amount)
|
||||
{
|
||||
if(0 < tmp49++) { tmp48.Append(", "); }
|
||||
tmp48.Append("Amount: ");
|
||||
Amount.ToString(tmp48);
|
||||
}
|
||||
if((Reference != null) && __isset.@reference)
|
||||
{
|
||||
if(0 < tmp49++) { tmp48.Append(", "); }
|
||||
tmp48.Append("Reference: ");
|
||||
Reference.ToString(tmp48);
|
||||
}
|
||||
if(__isset.@timestamp)
|
||||
{
|
||||
if(0 < tmp49++) { tmp48.Append(", "); }
|
||||
tmp48.Append("Timestamp: ");
|
||||
Timestamp.ToString(tmp48);
|
||||
}
|
||||
if(__isset.@fee)
|
||||
{
|
||||
if(0 < tmp49++) { tmp48.Append(", "); }
|
||||
tmp48.Append("Fee: ");
|
||||
Fee.ToString(tmp48);
|
||||
}
|
||||
if(__isset.@currency)
|
||||
{
|
||||
if(0 < tmp49++) { tmp48.Append(", "); }
|
||||
tmp48.Append("Currency: ");
|
||||
Currency.ToString(tmp48);
|
||||
}
|
||||
tmp48.Append(')');
|
||||
return tmp48.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.0)
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* </auto-generated>
|
||||
*/
|
||||
|
||||
#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 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 Echo.ThriftModel
|
||||
{
|
||||
public enum PaymentMethod
|
||||
{
|
||||
Cash = 0,
|
||||
Card = 1,
|
||||
Wire = 2,
|
||||
Crypto = 3,
|
||||
Other = 4,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,582 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.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 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 IDE0017 // object init can be simplified
|
||||
#pragma warning disable IDE0028 // collection init can be simplified
|
||||
#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 Echo.ThriftModel
|
||||
{
|
||||
|
||||
public partial class Variant : TBase
|
||||
{
|
||||
private global::Echo.ThriftModel.Kind _tag;
|
||||
private bool _boolVal;
|
||||
private long _i64Val;
|
||||
private long _u64Val;
|
||||
private double _f64Val;
|
||||
private string _strVal;
|
||||
private byte[] _bytesVal;
|
||||
private long _dtVal;
|
||||
private byte[] _guidVal;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// <seealso cref="global::Echo.ThriftModel.Kind"/>
|
||||
/// </summary>
|
||||
public global::Echo.ThriftModel.Kind Tag
|
||||
{
|
||||
get
|
||||
{
|
||||
return _tag;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@tag = true;
|
||||
this._tag = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool BoolVal
|
||||
{
|
||||
get
|
||||
{
|
||||
return _boolVal;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.boolVal = true;
|
||||
this._boolVal = value;
|
||||
}
|
||||
}
|
||||
|
||||
public long I64Val
|
||||
{
|
||||
get
|
||||
{
|
||||
return _i64Val;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.i64Val = true;
|
||||
this._i64Val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public long U64Val
|
||||
{
|
||||
get
|
||||
{
|
||||
return _u64Val;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.u64Val = true;
|
||||
this._u64Val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double F64Val
|
||||
{
|
||||
get
|
||||
{
|
||||
return _f64Val;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.f64Val = true;
|
||||
this._f64Val = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string StrVal
|
||||
{
|
||||
get
|
||||
{
|
||||
return _strVal;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.strVal = true;
|
||||
this._strVal = value;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] BytesVal
|
||||
{
|
||||
get
|
||||
{
|
||||
return _bytesVal;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.bytesVal = true;
|
||||
this._bytesVal = value;
|
||||
}
|
||||
}
|
||||
|
||||
public long DtVal
|
||||
{
|
||||
get
|
||||
{
|
||||
return _dtVal;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.dtVal = true;
|
||||
this._dtVal = value;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] GuidVal
|
||||
{
|
||||
get
|
||||
{
|
||||
return _guidVal;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.guidVal = true;
|
||||
this._guidVal = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Isset __isset;
|
||||
public struct Isset
|
||||
{
|
||||
public bool @tag;
|
||||
public bool boolVal;
|
||||
public bool i64Val;
|
||||
public bool u64Val;
|
||||
public bool f64Val;
|
||||
public bool strVal;
|
||||
public bool bytesVal;
|
||||
public bool dtVal;
|
||||
public bool guidVal;
|
||||
}
|
||||
|
||||
public Variant()
|
||||
{
|
||||
}
|
||||
|
||||
public Variant DeepCopy()
|
||||
{
|
||||
var tmp0 = new Variant();
|
||||
if(__isset.@tag)
|
||||
{
|
||||
tmp0.Tag = this.Tag;
|
||||
}
|
||||
tmp0.__isset.@tag = this.__isset.@tag;
|
||||
if(__isset.boolVal)
|
||||
{
|
||||
tmp0.BoolVal = this.BoolVal;
|
||||
}
|
||||
tmp0.__isset.boolVal = this.__isset.boolVal;
|
||||
if(__isset.i64Val)
|
||||
{
|
||||
tmp0.I64Val = this.I64Val;
|
||||
}
|
||||
tmp0.__isset.i64Val = this.__isset.i64Val;
|
||||
if(__isset.u64Val)
|
||||
{
|
||||
tmp0.U64Val = this.U64Val;
|
||||
}
|
||||
tmp0.__isset.u64Val = this.__isset.u64Val;
|
||||
if(__isset.f64Val)
|
||||
{
|
||||
tmp0.F64Val = this.F64Val;
|
||||
}
|
||||
tmp0.__isset.f64Val = this.__isset.f64Val;
|
||||
if((StrVal != null) && __isset.strVal)
|
||||
{
|
||||
tmp0.StrVal = this.StrVal;
|
||||
}
|
||||
tmp0.__isset.strVal = this.__isset.strVal;
|
||||
if((BytesVal != null) && __isset.bytesVal)
|
||||
{
|
||||
tmp0.BytesVal = this.BytesVal.ToArray();
|
||||
}
|
||||
tmp0.__isset.bytesVal = this.__isset.bytesVal;
|
||||
if(__isset.dtVal)
|
||||
{
|
||||
tmp0.DtVal = this.DtVal;
|
||||
}
|
||||
tmp0.__isset.dtVal = this.__isset.dtVal;
|
||||
if((GuidVal != null) && __isset.guidVal)
|
||||
{
|
||||
tmp0.GuidVal = this.GuidVal.ToArray();
|
||||
}
|
||||
tmp0.__isset.guidVal = this.__isset.guidVal;
|
||||
return tmp0;
|
||||
}
|
||||
|
||||
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.I32)
|
||||
{
|
||||
Tag = (global::Echo.ThriftModel.Kind)await iprot.ReadI32Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (field.Type == TType.Bool)
|
||||
{
|
||||
BoolVal = await iprot.ReadBoolAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (field.Type == TType.I64)
|
||||
{
|
||||
I64Val = await iprot.ReadI64Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (field.Type == TType.I64)
|
||||
{
|
||||
U64Val = await iprot.ReadI64Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (field.Type == TType.Double)
|
||||
{
|
||||
F64Val = await iprot.ReadDoubleAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
StrVal = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
BytesVal = await iprot.ReadBinaryAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (field.Type == TType.I64)
|
||||
{
|
||||
DtVal = await iprot.ReadI64Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
GuidVal = await iprot.ReadBinaryAsync(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 tmp1 = new TStruct("Variant");
|
||||
await oprot.WriteStructBeginAsync(tmp1, cancellationToken);
|
||||
var tmp2 = new TField();
|
||||
if(__isset.@tag)
|
||||
{
|
||||
tmp2.Name = "tag";
|
||||
tmp2.Type = TType.I32;
|
||||
tmp2.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteI32Async((int)Tag, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.boolVal)
|
||||
{
|
||||
tmp2.Name = "boolVal";
|
||||
tmp2.Type = TType.Bool;
|
||||
tmp2.ID = 2;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteBoolAsync(BoolVal, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.i64Val)
|
||||
{
|
||||
tmp2.Name = "i64Val";
|
||||
tmp2.Type = TType.I64;
|
||||
tmp2.ID = 3;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteI64Async(I64Val, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.u64Val)
|
||||
{
|
||||
tmp2.Name = "u64Val";
|
||||
tmp2.Type = TType.I64;
|
||||
tmp2.ID = 4;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteI64Async(U64Val, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.f64Val)
|
||||
{
|
||||
tmp2.Name = "f64Val";
|
||||
tmp2.Type = TType.Double;
|
||||
tmp2.ID = 5;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteDoubleAsync(F64Val, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((StrVal != null) && __isset.strVal)
|
||||
{
|
||||
tmp2.Name = "strVal";
|
||||
tmp2.Type = TType.String;
|
||||
tmp2.ID = 6;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteStringAsync(StrVal, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((BytesVal != null) && __isset.bytesVal)
|
||||
{
|
||||
tmp2.Name = "bytesVal";
|
||||
tmp2.Type = TType.String;
|
||||
tmp2.ID = 7;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteBinaryAsync(BytesVal, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if(__isset.dtVal)
|
||||
{
|
||||
tmp2.Name = "dtVal";
|
||||
tmp2.Type = TType.I64;
|
||||
tmp2.ID = 8;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteI64Async(DtVal, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((GuidVal != null) && __isset.guidVal)
|
||||
{
|
||||
tmp2.Name = "guidVal";
|
||||
tmp2.Type = TType.String;
|
||||
tmp2.ID = 9;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteBinaryAsync(GuidVal, 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 Variant other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return ((__isset.@tag == other.__isset.@tag) && ((!__isset.@tag) || (global::System.Object.Equals(Tag, other.Tag))))
|
||||
&& ((__isset.boolVal == other.__isset.boolVal) && ((!__isset.boolVal) || (global::System.Object.Equals(BoolVal, other.BoolVal))))
|
||||
&& ((__isset.i64Val == other.__isset.i64Val) && ((!__isset.i64Val) || (global::System.Object.Equals(I64Val, other.I64Val))))
|
||||
&& ((__isset.u64Val == other.__isset.u64Val) && ((!__isset.u64Val) || (global::System.Object.Equals(U64Val, other.U64Val))))
|
||||
&& ((__isset.f64Val == other.__isset.f64Val) && ((!__isset.f64Val) || (global::System.Object.Equals(F64Val, other.F64Val))))
|
||||
&& ((__isset.strVal == other.__isset.strVal) && ((!__isset.strVal) || (global::System.Object.Equals(StrVal, other.StrVal))))
|
||||
&& ((__isset.bytesVal == other.__isset.bytesVal) && ((!__isset.bytesVal) || (TCollections.Equals(BytesVal, other.BytesVal))))
|
||||
&& ((__isset.dtVal == other.__isset.dtVal) && ((!__isset.dtVal) || (global::System.Object.Equals(DtVal, other.DtVal))))
|
||||
&& ((__isset.guidVal == other.__isset.guidVal) && ((!__isset.guidVal) || (TCollections.Equals(GuidVal, other.GuidVal))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if(__isset.@tag)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Tag.GetHashCode();
|
||||
}
|
||||
if(__isset.boolVal)
|
||||
{
|
||||
hashcode = (hashcode * 397) + BoolVal.GetHashCode();
|
||||
}
|
||||
if(__isset.i64Val)
|
||||
{
|
||||
hashcode = (hashcode * 397) + I64Val.GetHashCode();
|
||||
}
|
||||
if(__isset.u64Val)
|
||||
{
|
||||
hashcode = (hashcode * 397) + U64Val.GetHashCode();
|
||||
}
|
||||
if(__isset.f64Val)
|
||||
{
|
||||
hashcode = (hashcode * 397) + F64Val.GetHashCode();
|
||||
}
|
||||
if((StrVal != null) && __isset.strVal)
|
||||
{
|
||||
hashcode = (hashcode * 397) + StrVal.GetHashCode();
|
||||
}
|
||||
if((BytesVal != null) && __isset.bytesVal)
|
||||
{
|
||||
hashcode = (hashcode * 397) + BytesVal.GetHashCode();
|
||||
}
|
||||
if(__isset.dtVal)
|
||||
{
|
||||
hashcode = (hashcode * 397) + DtVal.GetHashCode();
|
||||
}
|
||||
if((GuidVal != null) && __isset.guidVal)
|
||||
{
|
||||
hashcode = (hashcode * 397) + GuidVal.GetHashCode();
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp3 = new StringBuilder("Variant(");
|
||||
int tmp4 = 0;
|
||||
if(__isset.@tag)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("Tag: ");
|
||||
Tag.ToString(tmp3);
|
||||
}
|
||||
if(__isset.boolVal)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("BoolVal: ");
|
||||
BoolVal.ToString(tmp3);
|
||||
}
|
||||
if(__isset.i64Val)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("I64Val: ");
|
||||
I64Val.ToString(tmp3);
|
||||
}
|
||||
if(__isset.u64Val)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("U64Val: ");
|
||||
U64Val.ToString(tmp3);
|
||||
}
|
||||
if(__isset.f64Val)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("F64Val: ");
|
||||
F64Val.ToString(tmp3);
|
||||
}
|
||||
if((StrVal != null) && __isset.strVal)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("StrVal: ");
|
||||
StrVal.ToString(tmp3);
|
||||
}
|
||||
if((BytesVal != null) && __isset.bytesVal)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("BytesVal: ");
|
||||
BytesVal.ToString(tmp3);
|
||||
}
|
||||
if(__isset.dtVal)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("DtVal: ");
|
||||
DtVal.ToString(tmp3);
|
||||
}
|
||||
if((GuidVal != null) && __isset.guidVal)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("GuidVal: ");
|
||||
GuidVal.ToString(tmp3);
|
||||
}
|
||||
tmp3.Append(')');
|
||||
return tmp3.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.19.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 Microsoft.Extensions.Logging;
|
||||
using Thrift;
|
||||
using Thrift.Collections;
|
||||
using Thrift.Protocol;
|
||||
|
||||
|
||||
#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 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 Echo.ThriftModel
|
||||
{
|
||||
public static class echoExtensions
|
||||
{
|
||||
public static bool Equals(this Dictionary<string, global::Echo.ThriftModel.BusinessDocument> instance, object that)
|
||||
{
|
||||
if (!(that is Dictionary<string, global::Echo.ThriftModel.BusinessDocument> other)) return false;
|
||||
if (ReferenceEquals(instance, other)) return true;
|
||||
|
||||
return TCollections.Equals(instance, other);
|
||||
}
|
||||
|
||||
|
||||
public static int GetHashCode(this Dictionary<string, global::Echo.ThriftModel.BusinessDocument> instance)
|
||||
{
|
||||
return TCollections.GetHashCode(instance);
|
||||
}
|
||||
|
||||
|
||||
public static Dictionary<string, global::Echo.ThriftModel.BusinessDocument> DeepCopy(this Dictionary<string, global::Echo.ThriftModel.BusinessDocument> source)
|
||||
{
|
||||
if (source == null)
|
||||
return null;
|
||||
|
||||
var tmp232 = new Dictionary<string, global::Echo.ThriftModel.BusinessDocument>(source.Count);
|
||||
foreach (var pair in source)
|
||||
tmp232.Add((pair.Key != null) ? pair.Key : null, (pair.Value != null) ? pair.Value.DeepCopy() : null);
|
||||
return tmp232;
|
||||
}
|
||||
|
||||
|
||||
public static bool Equals(this Dictionary<string, global::Echo.ThriftModel.Variant> instance, object that)
|
||||
{
|
||||
if (!(that is Dictionary<string, global::Echo.ThriftModel.Variant> other)) return false;
|
||||
if (ReferenceEquals(instance, other)) return true;
|
||||
|
||||
return TCollections.Equals(instance, other);
|
||||
}
|
||||
|
||||
|
||||
public static int GetHashCode(this Dictionary<string, global::Echo.ThriftModel.Variant> instance)
|
||||
{
|
||||
return TCollections.GetHashCode(instance);
|
||||
}
|
||||
|
||||
|
||||
public static Dictionary<string, global::Echo.ThriftModel.Variant> DeepCopy(this Dictionary<string, global::Echo.ThriftModel.Variant> source)
|
||||
{
|
||||
if (source == null)
|
||||
return null;
|
||||
|
||||
var tmp233 = new Dictionary<string, global::Echo.ThriftModel.Variant>(source.Count);
|
||||
foreach (var pair in source)
|
||||
tmp233.Add((pair.Key != null) ? pair.Key : null, (pair.Value != null) ? pair.Value.DeepCopy() : null);
|
||||
return tmp233;
|
||||
}
|
||||
|
||||
|
||||
public static bool Equals(this List<global::Echo.ThriftModel.Attachment> instance, object that)
|
||||
{
|
||||
if (!(that is List<global::Echo.ThriftModel.Attachment> other)) return false;
|
||||
if (ReferenceEquals(instance, other)) return true;
|
||||
|
||||
return TCollections.Equals(instance, other);
|
||||
}
|
||||
|
||||
|
||||
public static int GetHashCode(this List<global::Echo.ThriftModel.Attachment> instance)
|
||||
{
|
||||
return TCollections.GetHashCode(instance);
|
||||
}
|
||||
|
||||
|
||||
public static List<global::Echo.ThriftModel.Attachment> DeepCopy(this List<global::Echo.ThriftModel.Attachment> source)
|
||||
{
|
||||
if (source == null)
|
||||
return null;
|
||||
|
||||
var tmp234 = new List<global::Echo.ThriftModel.Attachment>(source.Count);
|
||||
foreach (var elem in source)
|
||||
tmp234.Add((elem != null) ? elem.DeepCopy() : null);
|
||||
return tmp234;
|
||||
}
|
||||
|
||||
|
||||
public static bool Equals(this List<global::Echo.ThriftModel.BusinessDocument> instance, object that)
|
||||
{
|
||||
if (!(that is List<global::Echo.ThriftModel.BusinessDocument> other)) return false;
|
||||
if (ReferenceEquals(instance, other)) return true;
|
||||
|
||||
return TCollections.Equals(instance, other);
|
||||
}
|
||||
|
||||
|
||||
public static int GetHashCode(this List<global::Echo.ThriftModel.BusinessDocument> instance)
|
||||
{
|
||||
return TCollections.GetHashCode(instance);
|
||||
}
|
||||
|
||||
|
||||
public static List<global::Echo.ThriftModel.BusinessDocument> DeepCopy(this List<global::Echo.ThriftModel.BusinessDocument> source)
|
||||
{
|
||||
if (source == null)
|
||||
return null;
|
||||
|
||||
var tmp235 = new List<global::Echo.ThriftModel.BusinessDocument>(source.Count);
|
||||
foreach (var elem in source)
|
||||
tmp235.Add((elem != null) ? elem.DeepCopy() : null);
|
||||
return tmp235;
|
||||
}
|
||||
|
||||
|
||||
public static bool Equals(this List<global::Echo.ThriftModel.DocType> instance, object that)
|
||||
{
|
||||
if (!(that is List<global::Echo.ThriftModel.DocType> other)) return false;
|
||||
if (ReferenceEquals(instance, other)) return true;
|
||||
|
||||
return TCollections.Equals(instance, other);
|
||||
}
|
||||
|
||||
|
||||
public static int GetHashCode(this List<global::Echo.ThriftModel.DocType> instance)
|
||||
{
|
||||
return TCollections.GetHashCode(instance);
|
||||
}
|
||||
|
||||
|
||||
public static List<global::Echo.ThriftModel.DocType> DeepCopy(this List<global::Echo.ThriftModel.DocType> source)
|
||||
{
|
||||
if (source == null)
|
||||
return null;
|
||||
|
||||
var tmp236 = new List<global::Echo.ThriftModel.DocType>(source.Count);
|
||||
foreach (var elem in source)
|
||||
tmp236.Add(elem);
|
||||
return tmp236;
|
||||
}
|
||||
|
||||
|
||||
public static bool Equals(this List<global::Echo.ThriftModel.LineItem> instance, object that)
|
||||
{
|
||||
if (!(that is List<global::Echo.ThriftModel.LineItem> other)) return false;
|
||||
if (ReferenceEquals(instance, other)) return true;
|
||||
|
||||
return TCollections.Equals(instance, other);
|
||||
}
|
||||
|
||||
|
||||
public static int GetHashCode(this List<global::Echo.ThriftModel.LineItem> instance)
|
||||
{
|
||||
return TCollections.GetHashCode(instance);
|
||||
}
|
||||
|
||||
|
||||
public static List<global::Echo.ThriftModel.LineItem> DeepCopy(this List<global::Echo.ThriftModel.LineItem> source)
|
||||
{
|
||||
if (source == null)
|
||||
return null;
|
||||
|
||||
var tmp237 = new List<global::Echo.ThriftModel.LineItem>(source.Count);
|
||||
foreach (var elem in source)
|
||||
tmp237.Add((elem != null) ? elem.DeepCopy() : null);
|
||||
return tmp237;
|
||||
}
|
||||
|
||||
|
||||
public static bool Equals(this List<global::Echo.ThriftModel.Payment> instance, object that)
|
||||
{
|
||||
if (!(that is List<global::Echo.ThriftModel.Payment> other)) return false;
|
||||
if (ReferenceEquals(instance, other)) return true;
|
||||
|
||||
return TCollections.Equals(instance, other);
|
||||
}
|
||||
|
||||
|
||||
public static int GetHashCode(this List<global::Echo.ThriftModel.Payment> instance)
|
||||
{
|
||||
return TCollections.GetHashCode(instance);
|
||||
}
|
||||
|
||||
|
||||
public static List<global::Echo.ThriftModel.Payment> DeepCopy(this List<global::Echo.ThriftModel.Payment> source)
|
||||
{
|
||||
if (source == null)
|
||||
return null;
|
||||
|
||||
var tmp238 = new List<global::Echo.ThriftModel.Payment>(source.Count);
|
||||
foreach (var elem in source)
|
||||
tmp238.Add((elem != null) ? elem.DeepCopy() : null);
|
||||
return tmp238;
|
||||
}
|
||||
|
||||
|
||||
public static bool Equals(this List<int> instance, object that)
|
||||
{
|
||||
if (!(that is List<int> other)) return false;
|
||||
if (ReferenceEquals(instance, other)) return true;
|
||||
|
||||
return TCollections.Equals(instance, other);
|
||||
}
|
||||
|
||||
|
||||
public static int GetHashCode(this List<int> instance)
|
||||
{
|
||||
return TCollections.GetHashCode(instance);
|
||||
}
|
||||
|
||||
|
||||
public static List<int> DeepCopy(this List<int> source)
|
||||
{
|
||||
if (source == null)
|
||||
return null;
|
||||
|
||||
var tmp239 = new List<int>(source.Count);
|
||||
foreach (var elem in source)
|
||||
tmp239.Add(elem);
|
||||
return tmp239;
|
||||
}
|
||||
|
||||
|
||||
public static bool Equals(this List<string> instance, object that)
|
||||
{
|
||||
if (!(that is List<string> other)) return false;
|
||||
if (ReferenceEquals(instance, other)) return true;
|
||||
|
||||
return TCollections.Equals(instance, other);
|
||||
}
|
||||
|
||||
|
||||
public static int GetHashCode(this List<string> instance)
|
||||
{
|
||||
return TCollections.GetHashCode(instance);
|
||||
}
|
||||
|
||||
|
||||
public static List<string> DeepCopy(this List<string> source)
|
||||
{
|
||||
if (source == null)
|
||||
return null;
|
||||
|
||||
var tmp240 = new List<string>(source.Count);
|
||||
foreach (var elem in source)
|
||||
tmp240.Add((elem != null) ? elem : null);
|
||||
return tmp240;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user