public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("SpotNearbyItem"); oprot.WriteStructBegin(struc); TField field = new TField(); if (SpotItem != null && __isset.spotItem) { field.Name = "spotItem"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); SpotItem.Write(oprot); oprot.WriteFieldEnd(); } if (Location != null && __isset.location) { field.Name = "location"; field.Type = TType.Struct; field.ID = 11; oprot.WriteFieldBegin(field); Location.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }
public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("SearchItemUnion"); oprot.WriteStructBegin(struc); TField field = new TField(); if (CategoryItem != null && __isset.categoryItem) { field.Name = "categoryItem"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); CategoryItem.Write(oprot); oprot.WriteFieldEnd(); } if (SpotItem != null && __isset.spotItem) { field.Name = "spotItem"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); SpotItem.Write(oprot); oprot.WriteFieldEnd(); } if (ProductItem != null && __isset.productItem) { field.Name = "productItem"; field.Type = TType.Struct; field.ID = 3; oprot.WriteFieldBegin(field); ProductItem.Write(oprot); oprot.WriteFieldEnd(); } if (ServiceItem != null && __isset.serviceItem) { field.Name = "serviceItem"; field.Type = TType.Struct; field.ID = 4; oprot.WriteFieldBegin(field); ServiceItem.Write(oprot); oprot.WriteFieldEnd(); } if (YellowpageItem != null && __isset.yellowpageItem) { field.Name = "yellowpageItem"; field.Type = TType.Struct; field.ID = 5; oprot.WriteFieldBegin(field); YellowpageItem.Write(oprot); oprot.WriteFieldEnd(); } if (OaItem != null && __isset.oaItem) { field.Name = "oaItem"; field.Type = TType.Struct; field.ID = 6; oprot.WriteFieldBegin(field); OaItem.Write(oprot); oprot.WriteFieldEnd(); } if (GeoAddressItem != null && __isset.geoAddressItem) { field.Name = "geoAddressItem"; field.Type = TType.Struct; field.ID = 7; oprot.WriteFieldBegin(field); GeoAddressItem.Write(oprot); oprot.WriteFieldEnd(); } if (ShortcutItem != null && __isset.shortcutItem) { field.Name = "shortcutItem"; field.Type = TType.Struct; field.ID = 8; oprot.WriteFieldBegin(field); ShortcutItem.Write(oprot); oprot.WriteFieldEnd(); } if (SquareItem != null && __isset.squareItem) { field.Name = "squareItem"; field.Type = TType.Struct; field.ID = 9; oprot.WriteFieldBegin(field); SquareItem.Write(oprot); oprot.WriteFieldEnd(); } if (SquareCategoryItem != null && __isset.squareCategoryItem) { field.Name = "squareCategoryItem"; field.Type = TType.Struct; field.ID = 10; oprot.WriteFieldBegin(field); SquareCategoryItem.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }