public override string ToString() { StringBuilder __sb = new StringBuilder("MGeometryConstraint("); __sb.Append(", ParentObjectID: "); __sb.Append(ParentObjectID); if (ParentToConstraint != null && __isset.ParentToConstraint) { __sb.Append(", ParentToConstraint: "); __sb.Append(ParentToConstraint == null ? "<null>" : ParentToConstraint.ToString()); } if (TranslationConstraint != null && __isset.TranslationConstraint) { __sb.Append(", TranslationConstraint: "); __sb.Append(TranslationConstraint == null ? "<null>" : TranslationConstraint.ToString()); } if (RotationConstraint != null && __isset.RotationConstraint) { __sb.Append(", RotationConstraint: "); __sb.Append(RotationConstraint == null ? "<null>" : RotationConstraint.ToString()); } if (__isset.WeightingFactor) { __sb.Append(", WeightingFactor: "); __sb.Append(WeightingFactor); } __sb.Append(")"); return(__sb.ToString()); }
public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("MGeometryConstraint"); oprot.WriteStructBegin(struc); TField field = new TField(); if (ParentObjectID == null) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field ParentObjectID not set"); } field.Name = "ParentObjectID"; field.Type = TType.String; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteString(ParentObjectID); oprot.WriteFieldEnd(); if (ParentToConstraint != null && __isset.ParentToConstraint) { field.Name = "ParentToConstraint"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); ParentToConstraint.Write(oprot); oprot.WriteFieldEnd(); } if (TranslationConstraint != null && __isset.TranslationConstraint) { field.Name = "TranslationConstraint"; field.Type = TType.Struct; field.ID = 3; oprot.WriteFieldBegin(field); TranslationConstraint.Write(oprot); oprot.WriteFieldEnd(); } if (RotationConstraint != null && __isset.RotationConstraint) { field.Name = "RotationConstraint"; field.Type = TType.Struct; field.ID = 4; oprot.WriteFieldBegin(field); RotationConstraint.Write(oprot); oprot.WriteFieldEnd(); } if (__isset.WeightingFactor) { field.Name = "WeightingFactor"; field.Type = TType.Double; field.ID = 5; oprot.WriteFieldBegin(field); oprot.WriteDouble(WeightingFactor); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }