public override string ToString()
        {
            StringBuilder sb = new StringBuilder("ComponentAggregateStats(");

            sb.Append("Type: ");
            sb.Append(Type);
            sb.Append(",Common_stats: ");
            sb.Append(Common_stats == null ? "<null>" : Common_stats.ToString());
            sb.Append(",Specific_stats: ");
            sb.Append(Specific_stats == null ? "<null>" : Specific_stats.ToString());
            sb.Append(",Last_error: ");
            sb.Append(Last_error == null ? "<null>" : Last_error.ToString());
            sb.Append(")");
            return(sb.ToString());
        }
        public void Write(TProtocol oprot)
        {
            TStruct struc = new TStruct("ComponentAggregateStats");

            oprot.WriteStructBegin(struc);
            TField field = new TField();

            if (__isset.type)
            {
                field.Name = "type";
                field.Type = TType.I32;
                field.ID   = 1;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32((int)Type);
                oprot.WriteFieldEnd();
            }
            if (Common_stats != null && __isset.common_stats)
            {
                field.Name = "common_stats";
                field.Type = TType.Struct;
                field.ID   = 2;
                oprot.WriteFieldBegin(field);
                Common_stats.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Specific_stats != null && __isset.specific_stats)
            {
                field.Name = "specific_stats";
                field.Type = TType.Struct;
                field.ID   = 3;
                oprot.WriteFieldBegin(field);
                Specific_stats.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Last_error != null && __isset.last_error)
            {
                field.Name = "last_error";
                field.Type = TType.Struct;
                field.ID   = 4;
                oprot.WriteFieldBegin(field);
                Last_error.Write(oprot);
                oprot.WriteFieldEnd();
            }
            oprot.WriteFieldStop();
            oprot.WriteStructEnd();
        }