Design_SubModule/Scripts/thrift/gen-netstd/Byway/Thrift/Data/FakePlayroomDataMouldItem.cs
2026-03-08 16:32:09 +08:00

481 lines
13 KiB
C#

/**
* <auto-generated>
* Autogenerated by Thrift Compiler (0.22.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 Thrift;
using Thrift.Collections;
using System.Runtime.Serialization;
using Thrift.Protocol;
using Thrift.Protocol.Entities;
using Thrift.Protocol.Utilities;
using Thrift.Transport;
using Thrift.Transport.Client;
#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 IDE0305 // collection init can be simplified
#pragma warning disable IDE0034 // simplify default expression
#pragma warning disable IDE0066 // use switch expression
#pragma warning disable IDE0090 // simplify new expression
#pragma warning disable IDE0290 // use primary CTOR
#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 Byway.Thrift.Data
{
[DataContract(Namespace="")]
public partial class FakePlayroomDataMouldItem : TBase
{
private int _Id;
private string _Language;
private string _PetName;
private string _CatMould;
private string _PlayroomMould;
private int _ActivityType;
[DataMember(Order = 0)]
public int Id
{
get
{
return _Id;
}
set
{
__isset.Id = true;
this._Id = value;
}
}
[DataMember(Order = 0)]
public string Language
{
get
{
return _Language;
}
set
{
__isset.Language = true;
this._Language = value;
}
}
[DataMember(Order = 0)]
public string PetName
{
get
{
return _PetName;
}
set
{
__isset.PetName = true;
this._PetName = value;
}
}
[DataMember(Order = 0)]
public string CatMould
{
get
{
return _CatMould;
}
set
{
__isset.CatMould = true;
this._CatMould = value;
}
}
[DataMember(Order = 0)]
public string PlayroomMould
{
get
{
return _PlayroomMould;
}
set
{
__isset.PlayroomMould = true;
this._PlayroomMould = value;
}
}
[DataMember(Order = 0)]
public int ActivityType
{
get
{
return _ActivityType;
}
set
{
__isset.ActivityType = true;
this._ActivityType = value;
}
}
[DataMember(Order = 1)]
public Isset __isset;
[DataContract]
public struct Isset
{
[DataMember]
public bool Id;
[DataMember]
public bool Language;
[DataMember]
public bool PetName;
[DataMember]
public bool CatMould;
[DataMember]
public bool PlayroomMould;
[DataMember]
public bool ActivityType;
}
#region XmlSerializer support
public bool ShouldSerializeId()
{
return __isset.Id;
}
public bool ShouldSerializeLanguage()
{
return __isset.Language;
}
public bool ShouldSerializePetName()
{
return __isset.PetName;
}
public bool ShouldSerializeCatMould()
{
return __isset.CatMould;
}
public bool ShouldSerializePlayroomMould()
{
return __isset.PlayroomMould;
}
public bool ShouldSerializeActivityType()
{
return __isset.ActivityType;
}
#endregion XmlSerializer support
public FakePlayroomDataMouldItem()
{
}
public FakePlayroomDataMouldItem DeepCopy()
{
var tmp0 = new FakePlayroomDataMouldItem();
if(__isset.Id)
{
tmp0.Id = this.Id;
}
tmp0.__isset.Id = this.__isset.Id;
if((Language != null) && __isset.Language)
{
tmp0.Language = this.Language;
}
tmp0.__isset.Language = this.__isset.Language;
if((PetName != null) && __isset.PetName)
{
tmp0.PetName = this.PetName;
}
tmp0.__isset.PetName = this.__isset.PetName;
if((CatMould != null) && __isset.CatMould)
{
tmp0.CatMould = this.CatMould;
}
tmp0.__isset.CatMould = this.__isset.CatMould;
if((PlayroomMould != null) && __isset.PlayroomMould)
{
tmp0.PlayroomMould = this.PlayroomMould;
}
tmp0.__isset.PlayroomMould = this.__isset.PlayroomMould;
if(__isset.ActivityType)
{
tmp0.ActivityType = this.ActivityType;
}
tmp0.__isset.ActivityType = this.__isset.ActivityType;
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)
{
Id = await iprot.ReadI32Async(cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 2:
if (field.Type == TType.String)
{
Language = await iprot.ReadStringAsync(cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 3:
if (field.Type == TType.String)
{
PetName = await iprot.ReadStringAsync(cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 4:
if (field.Type == TType.String)
{
CatMould = await iprot.ReadStringAsync(cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 5:
if (field.Type == TType.String)
{
PlayroomMould = await iprot.ReadStringAsync(cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 6:
if (field.Type == TType.I32)
{
ActivityType = 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 tmp1 = new TStruct("FakePlayroomDataMouldItem");
await oprot.WriteStructBeginAsync(tmp1, cancellationToken);
var tmp2 = new TField();
if(__isset.Id)
{
tmp2.Name = "Id";
tmp2.Type = TType.I32;
tmp2.ID = 1;
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
await oprot.WriteI32Async(Id, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((Language != null) && __isset.Language)
{
tmp2.Name = "Language";
tmp2.Type = TType.String;
tmp2.ID = 2;
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
await oprot.WriteStringAsync(Language, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((PetName != null) && __isset.PetName)
{
tmp2.Name = "PetName";
tmp2.Type = TType.String;
tmp2.ID = 3;
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
await oprot.WriteStringAsync(PetName, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((CatMould != null) && __isset.CatMould)
{
tmp2.Name = "CatMould";
tmp2.Type = TType.String;
tmp2.ID = 4;
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
await oprot.WriteStringAsync(CatMould, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((PlayroomMould != null) && __isset.PlayroomMould)
{
tmp2.Name = "PlayroomMould";
tmp2.Type = TType.String;
tmp2.ID = 5;
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
await oprot.WriteStringAsync(PlayroomMould, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
if(__isset.ActivityType)
{
tmp2.Name = "ActivityType";
tmp2.Type = TType.I32;
tmp2.ID = 6;
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
await oprot.WriteI32Async(ActivityType, 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 FakePlayroomDataMouldItem 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.Language == other.__isset.Language) && ((!__isset.Language) || (global::System.Object.Equals(Language, other.Language))))
&& ((__isset.PetName == other.__isset.PetName) && ((!__isset.PetName) || (global::System.Object.Equals(PetName, other.PetName))))
&& ((__isset.CatMould == other.__isset.CatMould) && ((!__isset.CatMould) || (global::System.Object.Equals(CatMould, other.CatMould))))
&& ((__isset.PlayroomMould == other.__isset.PlayroomMould) && ((!__isset.PlayroomMould) || (global::System.Object.Equals(PlayroomMould, other.PlayroomMould))))
&& ((__isset.ActivityType == other.__isset.ActivityType) && ((!__isset.ActivityType) || (global::System.Object.Equals(ActivityType, other.ActivityType))));
}
public override int GetHashCode() {
int hashcode = 157;
unchecked {
if(__isset.Id)
{
hashcode = (hashcode * 397) + Id.GetHashCode();
}
if((Language != null) && __isset.Language)
{
hashcode = (hashcode * 397) + Language.GetHashCode();
}
if((PetName != null) && __isset.PetName)
{
hashcode = (hashcode * 397) + PetName.GetHashCode();
}
if((CatMould != null) && __isset.CatMould)
{
hashcode = (hashcode * 397) + CatMould.GetHashCode();
}
if((PlayroomMould != null) && __isset.PlayroomMould)
{
hashcode = (hashcode * 397) + PlayroomMould.GetHashCode();
}
if(__isset.ActivityType)
{
hashcode = (hashcode * 397) + ActivityType.GetHashCode();
}
}
return hashcode;
}
public override string ToString()
{
var tmp3 = new StringBuilder("FakePlayroomDataMouldItem(");
int tmp4 = 0;
if(__isset.Id)
{
if(0 < tmp4++) { tmp3.Append(", "); }
tmp3.Append("Id: ");
Id.ToString(tmp3);
}
if((Language != null) && __isset.Language)
{
if(0 < tmp4++) { tmp3.Append(", "); }
tmp3.Append("Language: ");
Language.ToString(tmp3);
}
if((PetName != null) && __isset.PetName)
{
if(0 < tmp4++) { tmp3.Append(", "); }
tmp3.Append("PetName: ");
PetName.ToString(tmp3);
}
if((CatMould != null) && __isset.CatMould)
{
if(0 < tmp4++) { tmp3.Append(", "); }
tmp3.Append("CatMould: ");
CatMould.ToString(tmp3);
}
if((PlayroomMould != null) && __isset.PlayroomMould)
{
if(0 < tmp4++) { tmp3.Append(", "); }
tmp3.Append("PlayroomMould: ");
PlayroomMould.ToString(tmp3);
}
if(__isset.ActivityType)
{
if(0 < tmp4++) { tmp3.Append(", "); }
tmp3.Append("ActivityType: ");
ActivityType.ToString(tmp3);
}
tmp3.Append(')');
return tmp3.ToString();
}
}
}