public override string ToString() { StringBuilder __sb = new StringBuilder("TDDIHARAArtifactUnion("); bool __first = true; if (HARAPackage != null && __isset.HARAPackage) { if(!__first) { __sb.Append(", "); } __first = false; __sb.Append("HARAPackage: "); __sb.Append(HARAPackage); } if (HazardTypeSystem != null && __isset.HazardTypeSystem) { if(!__first) { __sb.Append(", "); } __first = false; __sb.Append("HazardTypeSystem: "); __sb.Append(HazardTypeSystem== null ? "<null>" : HazardTypeSystem.ToString()); } if (RiskParameter != null && __isset.RiskParameter) { if(!__first) { __sb.Append(", "); } __first = false; __sb.Append("RiskParameter: "); __sb.Append(RiskParameter== null ? "<null>" : RiskParameter.ToString()); } if (RiskAssessment != null && __isset.RiskAssessment) { if(!__first) { __sb.Append(", "); } __first = false; __sb.Append("RiskAssessment: "); __sb.Append(RiskAssessment== null ? "<null>" : RiskAssessment.ToString()); } if (HazardType != null && __isset.HazardType) { if(!__first) { __sb.Append(", "); } __first = false; __sb.Append("HazardType: "); __sb.Append(HazardType== null ? "<null>" : HazardType.ToString()); } if (MalFunction != null && __isset.MalFunction) { if(!__first) { __sb.Append(", "); } __first = false; __sb.Append("MalFunction: "); __sb.Append(MalFunction== null ? "<null>" : MalFunction.ToString()); } if (Hazard != null && __isset.Hazard) { if(!__first) { __sb.Append(", "); } __first = false; __sb.Append("Hazard: "); __sb.Append(Hazard== null ? "<null>" : Hazard.ToString()); } __sb.Append(")"); return __sb.ToString(); }
public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("TDDIHARAArtifactUnion"); oprot.WriteStructBegin(struc); TField field = new TField(); if (HARAPackage != null && __isset.HARAPackage) { field.Name = "HARAPackage"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); HARAPackage.Write(oprot); oprot.WriteFieldEnd(); } if (HazardTypeSystem != null && __isset.HazardTypeSystem) { field.Name = "HazardTypeSystem"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); HazardTypeSystem.Write(oprot); oprot.WriteFieldEnd(); } if (RiskParameter != null && __isset.RiskParameter) { field.Name = "RiskParameter"; field.Type = TType.Struct; field.ID = 3; oprot.WriteFieldBegin(field); RiskParameter.Write(oprot); oprot.WriteFieldEnd(); } if (RiskAssessment != null && __isset.RiskAssessment) { field.Name = "RiskAssessment"; field.Type = TType.Struct; field.ID = 4; oprot.WriteFieldBegin(field); RiskAssessment.Write(oprot); oprot.WriteFieldEnd(); } if (HazardType != null && __isset.HazardType) { field.Name = "HazardType"; field.Type = TType.Struct; field.ID = 5; oprot.WriteFieldBegin(field); HazardType.Write(oprot); oprot.WriteFieldEnd(); } if (MalFunction != null && __isset.MalFunction) { field.Name = "MalFunction"; field.Type = TType.Struct; field.ID = 6; oprot.WriteFieldBegin(field); MalFunction.Write(oprot); oprot.WriteFieldEnd(); } if (Hazard != null && __isset.Hazard) { field.Name = "Hazard"; field.Type = TType.Struct; field.ID = 7; oprot.WriteFieldBegin(field); Hazard.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }