-
Notifications
You must be signed in to change notification settings - Fork 23
/
syndication.go
1497 lines (1455 loc) · 49.7 KB
/
syndication.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package syndication
import (
"encoding/json"
"encoding/xml"
"io"
)
// EachListing listens to a function that walks listings
type EachListing func(Listing, error) error
// ToListing creates an adapter to be used with something that walks a large stream
// and segments it into smaller doms
func ToListing(each EachListing) func(io.ReadCloser, error) error {
return func(body io.ReadCloser, err error) error {
if err != nil {
return err
}
listing := Listing{}
err = xml.NewDecoder(body).Decode(&listing)
return each(listing, err)
}
}
// initial Syndication mappings courtesy of http://github.com/cridenour
// Listings is a top level element for sharing a
// collection of listings.
type Listings struct {
// The unique id, or key for this collection of listings.
ListingsKey string `xml:"listingsKey,attr"`
// The version number for this schema.
Version string `xml:"version,attr"`
// The fully formatted version number.
VersionTimestamp string `xml:"versionTimestamp,attr"`
// The language used. Defaults to US English.
Language string `xml:"lang,attr"`
// Zero or more listings is contained within the item type.
Listings []Listing `xml:"Listing"`
// The disclaimer string for the collection of listings
Disclaimer SecureString `xml:"Disclaimer"`
}
// OtherChoice is to be used within enumerations requiring
// the presence of an attribute descriptor. This
// attribute is called otherDescription and should only
// be used in the case of the enum having the value of
// "Other".
type OtherChoice struct {
// Description only to be used when Value is "Other"
Description *string `xml:"otherDescription,attr" json:",omitempty"`
// Value of the other choices
Value string `xml:",chardata"`
}
// GetValue ...
func (oc *OtherChoice) GetValue() string {
if oc.Value == "Other" {
if oc.Description != nil {
return *oc.Description
}
return ""
}
return oc.Value
}
// MarshalJSON ...
func (oc *OtherChoice) MarshalJSON() ([]byte, error) {
return json.Marshal(oc.GetValue())
}
// SecureString ...
// Disclaimer is text that serves as a negation or limitation of the rights under
// a warranty given by a seller to a buyer.
type SecureString struct {
// The NAR Information Security Guidelines class.
// Possible values: Public, Confidential, Secret
// Default: Confidential
SecurityClass string `xml:"http://rets.org/xsd/RETSCommons isgSecurityClass,attr"`
// Inherits from xs:string
Value string `xml:",chardata"`
}
// Address for a property
type Address struct {
// Indicates the preference order within all
// the ContactMethods. The highest preference
// is 0.
PreferenceOrder int `xml:"http://rets.org/xsd/RETSCommons preference-order"`
// Indicates the preference order within all
// the Addresses. The highest preference is 0.
AddressPreferenceOrder int `xml:"http://rets.org/xsd/RETSCommons address-preference-order"`
// Provide a category for the address.
//
// Possible values:
//
// Display
// Mailing
// Shipping
// Billing
// Legal
// Tax
// Other
//
Category OtherChoice `xml:"http://rets.org/xsd/RETSCommons category"`
// The FullStreetAddress is a text representation of
// the address with the full civic location as a single entity.
//
// It may optionally include any of City, StateOrProvince,
// PostalCode and Country.
FullStreetAddress string `xml:"http://rets.org/xsd/RETSCommons FullStreetAddress"`
// Civic Address Fields
//
// May only contain civic fields or BoxNumber element
// Text field that uniquely locates a building on a given
// street. House numbers may have fractional or alphabetic
// modifiers. This is the first component in a street
// address.
StreetNumber *string `xml:"http://rets.org/xsd/RETSCommons StreetNumber,omitempty" json:",omitempty"`
// Text field containing the direction that follows the
// house number and precedes the street name in an address.
// The format may be either an abbreviation, such as "NE" or
// "N.E" or the full direction, "Northeast".
StreetDirPrefix *string `xml:"http://rets.org/xsd/RETSCommons StreetDirPrefix,omitempty" json:",omitempty"`
// Text field containing the name of the street in an
// address. This may follow the house number or, if
// applicable, the street direction prefix. It precedes the
// street suffix. for example, in the address
// "123 Main St.", "Main" is the street name.
StreetName *string `xml:"http://rets.org/xsd/RETSCommons StreetName,omitempty" json:",omitempty"`
// Text field describing the street type in an address. This
// field follows the street name and precedes the street
// direction suffix. A street suffix may be formatted as
// either an abbreviation or full name. Examples include:
// Road, Rd., Avenue, Ave., etc.
StreetSuffix *string `xml:"http://rets.org/xsd/RETSCommons StreetSuffix,omitempty" json:",omitempty"`
// Text field containing the direction that follows the
// street suffix in an address. The format may be either an
// abbreviation, such as "NE" or "N.E" or the full
// direction, "Northeast".
StreetDirSuffix *string `xml:"http://rets.org/xsd/RETSCommons StreetDirSuffix,omitempty" json:",omitempty"`
// Any additional elements needed to form the address
StreetAdditionalInfo *string `xml:"http://rets.org/xsd/RETSCommons StreetAdditionalInfo,omitempty" json:",omitempty"`
// Use the BoxNumber element to contain address location information
// not covered by the Civic Address.
//
// May only contain if without the civic fields above
// A container at a central mailing location, where the
// incoming mail of a person or legal entity is held until
// picked up by the person or legal entity. Also known as
// a post office box.
BoxNumber *string `xml:"http://rets.org/xsd/RETSCommons BoxNumber,omitempty" json:",omitempty"`
// Text field containing the number or portion of a larger
// building or complex. Unit Number should appear following
// the street suffix or, if it exists, the street suffix
// direction, in the street address. Examples are:
// "APT G", "55", etc.
UnitNumber *string `xml:"http://rets.org/xsd/RETSCommons UnitNumber,omitempty" json:",omitempty"`
// The city, township, municipality, etc. portion of the
// physical, legal or mailing address for a property,
// person, etc.
City *string `xml:"http://rets.org/xsd/RETSCommons City,omitempty" json:",omitempty"`
// Text field containing either the accepted postal
// abbreviation or the full name for one of the 50 U.S.
// states or 13 Canadian provinces/territories.
State *string `xml:"http://rets.org/xsd/RETSCommons StateOrProvince,omitempty" json:",omitempty"`
// In the United states, the postal code (ZIP code) the
// basic postal code format consists of five numerical
// digits and may include a five digit ZIP+4 code that
// allows delivery of a piece of mail to be even more
// accurately defined. In Canada, the postal code is a six
// character alpha-numerical code defined and maintained by
// Canada Post Corporation for mail processing
// (sorting and delivery).
PostalCode *string `xml:"http://rets.org/xsd/RETSCommons PostalCode,omitempty" json:",omitempty"`
// The group of addresses to which the USPS assigns the
// same code to aid in mail delivery. For the USPS, these
// codes are 9 digits: 5 numbers for the ZIP Code, one
// letter for the carrier route type, and 3 numbers for the
// carrier route number.
CarrierRoute *string `xml:"http://rets.org/xsd/RETSCommons CarrierRoute,omitempty" json:",omitempty"`
// The territory of nation or state included in a person or
// property's legal or mailing address.
Country *string `xml:"http://rets.org/xsd/RETSCommons Country,omitempty" json:",omitempty"`
// Indicates the level of privacy for this information. Creation of
// this attribute inspired by the need to provide this level of
// privacy information for contact nformation: phone, email,
// address, and the like.
//
// Possible values:
//
// Public
// Agent/Member
// MLS
//
Privacy *string `xml:"http://rets.org/xsd/RETSCommons privacyType,omitempty" json:",omitempty"`
}
// PriceWithFrequency ...
// For attributes that start with a XML namespace, use the URL of the
// namespace to avoid compilation errors
//
// eg. xmlns:commons="http://rets.org/xsd/RETSCommons"
// commons:isgSecurityClass
// will become
// `xml:"http://rets.org/xsd/RETSCommons isgSecurityClass,attr"`
type PriceWithFrequency struct {
// The currencyPeriod attribute indicates that the price is repeated
// at the frequency indicated. The absence of the attribute indicates
// a one-time payment.
//
// Possible values:
//
// Daily
// Week
// Bi-Weekly
// Month
// Bi-Monthly
// Quarterly
// Semi-Annually
// Annually
// Seasonal
//
Frequency string `xml:"http://rets.org/xsd/RETSCommons currencyPeriod,attr,omitempty"`
// The NAR Information Security Guidelines class.
// Possible values: Public, Confidential, Secret
// Default: Confidential
SecurityClass string `xml:"http://rets.org/xsd/RETSCommons isgSecurityClass,attr,omitempty"`
// The currency code.
// This document uses the three character ASCII currency code
// values defined in ISO 4217.
// Default: USD
Currency string `xml:"http://rets.org/xsd/RETSCommons currencyCode,attr,omitempty"`
// Price inherits from a nullable decimal in XSD.
Value string `xml:",chardata"`
}
// AlternatePrice is a secondary price type in a different currency
type AlternatePrice struct {
// The list price for the property.
// Where range pricing is used, the higher of the two prices.
ListPrice PriceWithFrequency `xml:"AlternateListPrice"`
// Where range pricing is used, the lower price of the range
ListPriceLow *PriceWithFrequency `xml:"AlternateListPriceLow,omitempty" json:",omitempty"`
}
// SecureBoolean is a boolean element with an isgSecurityClass attribute.
type SecureBoolean struct {
// The NAR Information Security Guidelines class.
// Possible values: Public, Confidential, Secret
// Default: Confidential
SecurityClass string `xml:"http://rets.org/xsd/RETSCommons isgSecurityClass,attr"`
// Boolean value
Value bool `xml:",chardata"`
}
// SecureDateTime is a datetime element with an isgSecurityClass attribute.
type SecureDateTime struct {
// The NAR Information Security Guidelines class.
// Possible values: Public, Confidential, Secret
// Default: Confidential
SecurityClass string `xml:"http://rets.org/xsd/RETSCommons isgSecurityClass,attr"`
// DateTime inherits from a nullable datetime in XSD
Value string `xml:",chardata"`
}
// MarketingInformation contains items related
// to the contract between the
// selling agent and the owner.
// These indicators are used to determine the
// visibility of the listing on the internet,
// visibility of address on the internet, visibility
// of the photo on the internet, and whether the
// property has a sign. Additional elements
// may be others discovered in the future.
type MarketingInformation struct {
// The seller agreed to permit the listing
// to be marketed on the internet.
PermitInternet *SecureBoolean `xml:"http://rets.org/xsd/RETSCommons PermitInternet,omitempty" json:",omitempty"`
// The seller agreed to permit the property address
// to be displayed on the internet.
PermitAddress *SecureBoolean `xml:"http://rets.org/xsd/RETSCommons PermitAddressOnInternet,omitempty" json:",omitempty"`
// The seller agreed to permit the
// display of image(s) of the property
// on the internet.
PermitPicture *SecureBoolean `xml:"http://rets.org/xsd/RETSCommons PermitPictureOnInternet,omitempty" json:",omitempty"`
// The seller agreed to permit a for-sale
// sign on the property and asserts the
// right to provide that permission.
// This may be constrained by local
// rules or home-owner rules.
PermitSign *SecureBoolean `xml:"http://rets.org/xsd/RETSCommons PermitSignOnProperty,omitempty" json:",omitempty"`
// A for-sale sign is on the property.
HasSign *SecureBoolean `xml:"http://rets.org/xsd/RETSCommons HasSignOnProperty,omitempty" json:",omitempty"`
// Indicates whether the listing may be displayed.
PermitVOW *SecureBoolean `xml:"http://rets.org/xsd/RETSCommons VOWEntireListingDisplay,omitempty" json:",omitempty"`
// Indicates whether the listing address may be displayed.
PermitAddressVOW *SecureBoolean `xml:"http://rets.org/xsd/RETSCommons VOWAddressDisplay,omitempty" json:",omitempty"`
// Indicates whether the listing approximated valuation may be displayed.
PermitValuationVOW *SecureBoolean `xml:"http://rets.org/xsd/RETSCommons VOWAutomatedValuationDisplay,omitempty" json:",omitempty"`
// Indicates whether consumer comments may be displayed.
PermitCommentsVOW *SecureBoolean `xml:"http://rets.org/xsd/RETSCommons VOWConsumerComment,omitempty" json:",omitempty"`
}
// Media represents either a photo, video or other type of media file
type Media struct {
// The last time that the media was modified.
ModificationTimestamp *SecureDateTime `xml:"MediaModificationTimestamp,omitempty" json:",omitempty"`
// Url of the media file. Required.
URL string `xml:"MediaURL"`
// The display caption for this photo. It is intended
// to be a short title for the media.
Caption *string `xml:"MediaCaption,omitempty" json:",omitempty"`
// A narrative description of the media element.
Description *string `xml:"MediaDescription,omitempty" json:",omitempty"`
// Zeroth (0) element is the preferred photo by convention
OrderNumber *int `xml:"MediaOrderNumber,omitempty" json:",omitempty"`
// A placeholder for a classification of the media item
// Examples: Elevation (exterior), Interior, Community,
// View, Plan, Plat
// The purpose is to allow the media items (photos)
// to be grouped.
// Optional because it is not widely available.
Classification *string `xml:"MediaClassification,omitempty" json:",omitempty"`
}
// Area is a measurement in a two (of five) dimensions
type Area struct {
// Area measurement units.
//
// Possible values:
//
// sqaureFoot
// squareYard
// acre
// squareCentimeter
// squareMeter
// hectare
// unknown
//
// Defaults to squareFoot.
Units string `xml:"http://rets.org/xsd/RETSCommons areaUnits,attr"`
// The source of the measurement.
//
// Possible values:
//
// Appraisal
// Builder
// Measured
// Public Records
// Unknown
// Other
//
Source string `xml:"http://rets.org/xsd/RETSCommons measurementSource,attr"`
// Area inherits from a nullable decimal in XSD.
Value string `xml:",chardata"`
}
// ParticipantCode is an application defined coding for the participant
type ParticipantCode struct {
// The identifier for the participant code
ID string `xml:"ParticipantCodeId"`
// A description of the code. This could identify the
// system that the code comes from or any other
// purpose to assist in describing the code identifer
Description *string `xml:"ParticipantCodeDescription,omitempty" json:",omitempty"`
}
// ValueDescription is a common pair of elements
type ValueDescription struct {
// Value is an optional string
Value *string `xml:"Value,omitempty" json:",omitempty"`
// Description is an optional string
Description *string `xml:"Description,omitempty" json:",omitempty"`
}
// License is a professional license
type License struct {
// The values that a license may take. These licenses
// are typically issued by the State or Province where
// the person is practising. See Licensing.xsd for more.
//
// Possible values:
//
// Real Estate Broker
// Salesperson
// Auctioneer
// Certified General Appraiser
// Certified Residential Appraiser
// Licensed Appraiser
// Registered Appraiser
// Leasing Agent
// Mortgage Broker
// Apprentice Inspector
// Licensed Inspector
// Registered Inspector
// Property Management
// Rental Property Management
// Unknown
// Other
Category OtherChoice `xml:"LicenseCategory"`
// The License Number.
LicenseNumber SecureString `xml:"LicenseNumber"`
// A string representing the jurisdiction
// that the license issuing body is located.
Jurisdiction SecureString `xml:"Jurisdiction"`
// The license issuing body State.
State *string `xml:"StateOrProvince,omitempty" json:",omitempty"`
// DateTime when the license began being valid
Start *SecureDateTime `xml:"LicenseStartDateTime,omitempty" json:",omitempty"`
// DateTime when the license expires
Expiration *SecureDateTime `xml:"LicenseExpirationDateTime,omitempty" json:",omitempty"`
// DateTime when the license was transferred
Transfer *SecureDateTime `xml:"LicenseTransferDateTime,omitempty" json:",omitempty"`
}
// Participant represents a party in the deal.
// Different from Participants.xsd/ParticipantType
type Participant struct {
// A unique identifier for the participant.
Key string `xml:"ParticipantKey"`
// The well-known identifier for the
// participant. It is not necessarily the
// key field for the participant.
ID *string `xml:"ParticipantId,omitempty" json:",omitempty"`
// List of participant codes
Codes []ParticipantCode `xml:"ParticipantCode,omitempty" json:",omitempty"`
// First Name
FirstName *string `xml:"FirstName,omitempty" json:",omitempty"`
// Last Name
LastName *string `xml:"LastName,omitempty" json:",omitempty"`
// Role
Role *string `xml:"Role,omitempty" json:",omitempty"`
// Primary phone number
PrimaryPhone *string `xml:"PrimaryContactPhone,omitempty" json:",omitempty"`
// Office Phone
OfficePhone *string `xml:"OfficePhone,omitempty" json:",omitempty"`
// Mobile Phone
MobilePhone *string `xml:"MobilePhone,omitempty" json:",omitempty"`
// Email
Email *string `xml:"Email,omitempty" json:",omitempty"`
// Fax
Fax *string `xml:"Fax,omitempty" json:",omitempty"`
// Website
Website *string `xml:"WebsiteURL,omitempty" json:",omitempty"`
// Photo
Photo *string `xml:"PhotoURL,omitempty" json:",omitempty"`
// Address
Address *Address `xml:"Address,omitempty" json:",omitempty"`
// A collection of licenses for the participant
Licenses []License `xml:"Licenses>License,omitempty" json:",omitempty"`
// Allow for value/description pair as an open bucket for extensibility.
AdditionalInfo []ValueDescription `xml:"ParticipantAdditionalInformation,omitempty" json:",omitempty"`
}
// OfficeCode is an application defined encoding for the office.
type OfficeCode struct {
// The identifier for the office.
// It should permit unique identification of
// office within the system
ID string `xml:"OfficeCodeId"`
// A description of the code. This could identify the
// system that the code comes from or any other
// purpose to assist in describing the code identifer
Desription *string `xml:"OfficeCodeDescription,omitempty" json:",omitempty"`
}
// Office ...
type Office struct {
// A unique identifier for the office.
Key string `xml:"OfficeKey"`
// The well-known identifier for the
// office. It is not necessarily the
// key field for the office.
ID string `xml:"OfficeId"`
Level *string `xml:"Level,omitempty" json:",omitempty"`
OfficeCodes []OfficeCode `xml:"OfficeCode,omitempty" json:",omitempty"`
// The name of the office.
// For example, "Le Page Westside"
Name *string `xml:"Name,omitempty" json:",omitempty"`
CorporateName *string `xml:"CorporateName,omitempty" json:",omitempty"`
BrokerID *string `xml:"BrokerId,omitempty" json:",omitempty"`
// The identifier for the main office of any type of group of offices
MainOfficeID *string `xml:"MainOfficeId,omitempty" json:",omitempty"`
Phone *string `xml:"PhoneNumber,omitempty" json:",omitempty"`
Fax *string `xml:"Fax,omitempty" json:",omitempty"`
Addresss *Address `xml:"Address,omitempty" json:",omitempty"`
Email *string `xml:"OfficeEmail,omitempty" json:",omitempty"`
Website *string `xml:"Website,omitempty" json:",omitempty"`
Logo *string `xml:"OfficeLogoURL,omitempty" json:",omitempty"`
AdditionalInfo []ValueDescription `xml:"OfficeAdditionalInformation,omitempty" json:",omitempty"`
}
// Business ...
type Business struct {
// Name of the business. Required.
Name string `xml:"Name"`
// An identifier from the providing system.
ID *string `xml:"BusinessId,omitempty" json:",omitempty"`
// Phone number as a string, no specific format enforced.
Phone *string `xml:"Phone,omitempty" json:",omitempty"`
// Fax number as a string, no specific format enforced.
Fax *string `xml:"Fax,omitempty" json:",omitempty"`
// Email address as a string no specific format enforced.
Email *string `xml:"Email,omitempty" json:",omitempty"`
// URL for the company website. Format is enforced.
Website *string `xml:"WebsiteURL,omitempty" json:",omitempty"`
// URL for the business logo. Format is enforced.
Logo *string `xml:"LogoURL,omitempty" json:",omitempty"`
// Address for the business.
Address *Address `xml:"Address,omitempty" json:",omitempty"`
AdditionalInfo *string `xml:"BusinessAdditionalInformation,omitempty" json:",omitempty"`
}
// Structure ... TODO: Implement structure from RETSCommon.xsd
type Structure struct {
}
// School in the given property's area.
type School struct {
// The name of the school.
Name *string `xml:"http://rets.org/xsd/RETSCommons Name,omitempty" json:",omitempty"`
// The type of school in question.
// Examples include Middle, Junior High,
// etc.
Category *OtherChoice `xml:"http://rets.org/xsd/RETSCommons SchoolCategory,omitempty" json:",omitempty"`
// The district that a school is in.
// A school may only belong to a single
// district.
District *SecureString `xml:"http://rets.org/xsd/RETSCommons District,omitempty" json:",omitempty"`
// Further information about the school.
Description *string `xml:"http://rets.org/xsd/RETSCommons Description,omitempty" json:",omitempty"`
}
// Community describes the area around the house, including schools
type Community struct {
// Text field containing the name of a particular area of
// land laid out and divided into lots, blocks, and building
// sites, and in which public facilities are laid out, such as
// streets, alleys, parks, and easements for public utilities.
// Types of subdivisions include common interests (condominiums),
// planned developments, time-share projects,
Subdivision *SecureString `xml:"http://rets.org/xsd/RETSCommons Subdivision,omitempty" json:",omitempty"`
// The collection of schools for a given property.
Schools []School `xml:"http://rets.org/xsd/RETSCommons Schools>School,omitempty" json:",omitempty"`
// The name of the development, neighborhood or
// association in which the property is located.
Name *SecureString `xml:"http://rets.org/xsd/RETSCommons CommunityName,omitempty" json:",omitempty"`
// Text description of the common amenities offered to residents
// in a common interest where a major percentage of the residents
// in each household are 55 or older. May include items such as:
// assisted living, senior center, etc.
SeniorCommunity *SecureString `xml:"http://rets.org/xsd/RETSCommons SeniorCommunity,omitempty" json:",omitempty"`
Structures []Structure `xml:"http://rets.org/xsd/RETSCommons ExistingStructures>ExistingStructure,omitempty" json:",omitempty"`
}
// Neighborhood has a name and optional description
type Neighborhood struct {
Name *string `xml:"Name,omitempty" json:",omitempty"`
Description *string `xml:"Description,omitempty" json:",omitempty"`
}
// Location ...
type Location struct {
Latitude *string `xml:"Latitude,omitempty" json:",omitempty"`
Longitude *string `xml:"Longitude,omitempty" json:",omitempty"`
Elevation *string `xml:"Elevation,omitempty" json:",omitempty"`
MapCoordinate *string `xml:"MapCoordinate,omitempty" json:",omitempty"`
Directions *string `xml:"Directions,omitempty" json:",omitempty"`
GeocodeOptions *string `xml:"GeocodeOptions,omitempty" json:",omitempty"`
County *string `xml:"County,omitempty" json:",omitempty"`
StreetIntersection *string `xml:"StreetIntersection,omitempty" json:",omitempty"`
ParcelID *string `xml:"ParcelId,omitempty" json:",omitempty"`
Community *Community `xml:"Community,omitempty" json:",omitempty"`
// A string of the amenites found in the community
CommunityAmenities *string `xml:"CommunityAmenities,omitempty" json:",omitempty"`
// The mailing address of the community.
CommunityAddress *Address `xml:"CommunityAddress,omitempty" json:",omitempty"`
// The total number of floors in the building.
TotalNumFloors *int `xml:"TotalNumFloors,omitempty" json:",omitempty"`
// The civic building code zoning type
Zoning *string `xml:"Zoning,omitempty" json:",omitempty"`
// A string of the amenites found in the building of the listing
BuildingAmenities *string `xml:"BuildingAmenities,omitempty" json:",omitempty"`
// The total number of units in the building of the listing
BuildingUnitCount *int `xml:"BuildingUnitCount,omitempty" json:",omitempty"`
// Neighborhood the property is located in
Neighborhoods []Neighborhood `xml:"Neighborhoods>Neighborhood,omitempty" json:",omitempty"`
}
// OpenHouse ...
type OpenHouse struct {
Date string `xml:"Date"`
StartTime *string `xml:"StartTime,omitempty" json:",omitempty"`
EndTime *string `xml:"EndTime,omitempty" json:",omitempty"`
Description *string `xml:"Description,omitempty" json:",omitempty"`
Appointment *bool `xml:"AppointmentRequiredYN,omitempty" json:",omitempty"`
}
// Tax ...
type Tax struct {
Year *int `xml:"Year,omitempty" json:",omitempty"`
Amount string `xml:"Amount"`
Description string `xml:"TaxDescription"`
}
// Expense ...
type Expense struct {
Category string `xml:"ExpenseCategory,omitempty" json:",omitempty"`
Value *PriceWithFrequency `xml:"ExpenseValue,omitempty" json:",omitempty"`
}
// Characteristics ...
type Characteristics struct {
//
//
// Possible values:
//
// Barbeque or Grill
// Coffee System
// Coffee System - Rough in
// Cooktop
// Cooktop - Electric
// Cooktop - Electric 2 burner
// Cooktop - Electric 6 burner
// Cooktop - Gas
// Cooktop - Gas 2 burner
// Cooktop - Gas 5 burner
// Cooktop - Gas 6 burner
// Cooktop - Gas Custom
// Cooktop - Induction
// Cooktop - Induction 2 burner
// Cooktop - Induction 6 burner
// Dishwasher
// Dishwasher - Drawer
// Dishwasher - Two or more
// Dryer
// Dryer - Dual fuel
// Dryer - Electric 110V
// Dryer - Electric 220V
// Dryer - Gas
// Dryer - Gas rough in
// Freezer
// Freezer - Compact
// Freezer - Upright
// Garbage Disposer
// Ice Maker
// Microwave
// Oven
// Oven - Convection
// Oven - Double
// Oven - Double Electric
// Oven - Double Gas
// Oven - Gas
// Oven - Gas 3 wide
// Oven - Self-Cleaning
// Oven - Steam
// Oven - Twin
// Oven - Twin Electric
// Oven - Twin Gas
// Oven - Twin Gas 3 wide
// Oven - Twin Mixed
// Range
// Range - Built In
// Range - Dual
// Range - Dual 6 burner
// Range - Dual 8 burner
// Range - Dual 10 burner
// Range - Electric
// Range - Gas
// Range - Gas 6 burner
// Range - Gas 8 burner
// Range - Gas 10 burner
// Range - Induction
// Range - Other
// Rangetop - Electric
// Rangetop - Electric 2 burner
// Rangetop - Electric 6 burner
// Rangetop - Gas
// Rangetop - Gas 2 burner
// Rangetop - Gas 4 burner compact
// Rangetop - Gas 6 burner
// Rangetop - Gas 8 burner
// Rangetop - Gas 10 burner
// Rangetop - Gas Custom
// Rangetop - Induction
// Rangetop - Induction 2 burner
// Rangetop - Induction 6 burner
// Refrigerator
// Refrigerator - Bar
// Refrigerator - Built-in
// Refrigerator - Built-in With Plumbing
// Refrigerator - Drawer
// Refrigerator - Side by Side
// Refrigerator - Undercounter
// Refrigerator - Wine Storage
// Refrigerator - With Plumbing
// Trash Compactor
// Vacuum System
// Vacuum System - Rough in
// Vent Hood
// Vent Hood 6 burner
// Vent Hood 8 burner
// Vent Hood 10 burner
// Warming Drawer
// Washer
// Washer - Front load
// Washer - Steamer
// Washer - Top load
// Washer/Dryer Combo
// Washer/Dryer Stack
// Water - Filter
// Water - Instant Hot
// Water - Purifier
// Water - Softener
// None
// Other
//
Appliances []OtherChoice `xml:"Appliances>Appliance,omitempty" json:",omitempty"`
// Description of the architectural design of the property listed.
//
// Possible values:
//
// A Frame
// Art Deco
// Bungalow
// Cape Cod
// Colonial
// Contemporary
// Conventional
// Cottage
// Craftsman
// Creole
// Dome
// Dutch Colonial
// English
// Federal
// French
// French Provincial
// Georgian
// Gothic Revival
// Greek Revival
// High Rise
// Historical
// International
// Italianate
// Loft
// Mansion
// Mediterranean
// Modern
// Monterey
// Mountain
// National
// Neoclassical
// New Traditional
// Prairie
// Pueblo
// Queen Anne
// Rambler
// Ranch
// Regency
// Rustic
// Saltbox
// Santa Fe
// Second Empire
// Shed
// Shingle
// Shotgun
// Spanish
// Spanish Eclectic
// Split Level
// Stick
// Tudor
// Victorian
// Other
//
ArchitectureStyle *OtherChoice `xml:"ArchitectureStyle,omitempty" json:",omitempty"`
// Indicates whether or not the property listed has an attic.
HasAttic *bool `xml:"HasAttic,omitempty" json:",omitempty"`
// Indicates whether or not the property listed has a barbecue area.
HasBarbecueArea *bool `xml:"HasBarbecueArea,omitempty" json:",omitempty"`
// Indicates whether or not the property listed has a basement.
HasBasement *bool `xml:"HasBasement,omitempty" json:",omitempty"`
// The number of units in the building listed.
BuildingUnitCount *int `xml:"BuildingUnitCount,omitempty" json:",omitempty"`
// Indicates whether or not the property listed is ready for cable.
IsCableReady *bool `xml:"IsCableReady,omitempty" json:",omitempty"`
// Indicates whether or not the property listed has one or more ceiling fans.
HasCeilingFan *bool `xml:"HasCeilingFan,omitempty" json:",omitempty"`
// Number of the floor the listed condominium is located on.
CondoFloorNum *int `xml:"CondoFloorNum,omitempty" json:",omitempty"`
// Collection of all the types of cooling system the listed property has.
//
// Possible values:
//
// Attic Fan
// Ceiling Fan(s)
// Central A/C
// Central Evaporative
// Central Fan
// Chilled Water
// Dehumidifiers
// Dessicant Cooler
// Evaporative
// Heat Pumps
// Partial
// Radiant Floor
// Radiant Floor Ground Loop
// Refrigerator/Evaporative
// Solar A/C-Active
// Solar A/C-Passive
// Wall Unit(s) A/C
// Wall Unit(s) Evaporative
// Window Unit(s) A/C
// Window Unit(s) Evaporative
// Zoned A/C
// Unknown
// Other
// None
//
CoolingSystems []OtherChoice `xml:"CoolingSystems>CoolingSystem,omitempty" json:",omitempty"`
// Indicates whether or not the property listed has one or more decks.
HasDeck *bool `xml:"HasDeck,omitempty" json:",omitempty"`
// Indicates whether or not the property listed has disabled access ramps,
// elevators, or the like.
HasDisabledAccess *bool `xml:"HasDisabledAccess,omitempty" json:",omitempty"`
// Indicates whether or not the property listed has a dock.
HasDock *bool `xml:"HasDock,omitempty" json:",omitempty"`
// Indicates whether or not the property listed has a doorman.
HasDoorman *bool `xml:"HasDoorman,omitempty" json:",omitempty"`
// Indicates whether or not the property listed has double pane windows.
HasDoublePaneWindows *bool `xml:"HasDoublePaneWindows,omitempty" json:",omitempty"`
// Indicates whether or not the property listed has an elevator.
HasElevator *bool `xml:"HasElevator,omitempty" json:",omitempty"`
// Collection of types of exterior covering or adornment on the home.
//
// Possible values:
//
// Adobe
// Aluminum Siding
// Asbestos
// Asphalt
// Block
// Board and Batten
// Brick
// Brick Veneer
// Brick and Wood
// Cedar Siding
// Comb
// Composition
// Composition Shingles
// Concrete
// Concrete Block
// EIFS
// Fiberglass
// Glass
// Hardboard
// Log
// Log Siding
// Masonite
// Masonry
// Metal
// Metal Siding
// Poured Concrete
// Shingles (Not Wood)
// Stone
// Stone Veneer
// Stucco
// Stucco - Synthetic
// Tile
// Tilt-up (Pre-Cast Concrete)
// Vinyl Siding
// Wood
// Wood Shingle
// Wood Siding
// Unknown
// Other
// None
//
ExteriorTypes []OtherChoice `xml:"ExteriorTypes>ExteriorType,omitempty" json:",omitempty"`
// Indicates whether or not the listed property has a fireplace.
HasFireplace *bool `xml:"HasFireplace,omitempty" json:",omitempty"`
// Collection of floor coverings.
//
// Possible values:
//
// Bamboo
// Brick
// Carpet
// Carpet - Full
// Carpet - Partial
// Concrete
// Concrete - Bare
// Concrete - Painted
// Cork
// Drainage
// Engineered Wood
// Glass
// Granite
// Hardwood
// Laminate
// Linoleum
// Load Restriction
// Marble
// Parquet Wood
// Rough-in
// Slate
// Soft Wood
// Solid Wood
// Specialty
// Specialty Concrete
// Tile
// Tile - Ceramic
// Tile - Porcelain
// Tile - Stone
// Tile or Stone
// Vinyl
// Wood
// Unknown
// Other
// None
//
FloorCoverings []OtherChoice `xml:"FloorCoverings>FloorCovering,omitempty" json:",omitempty"`
// Indicates whether or not a garden is located on the listed property.
HasGarden *bool `xml:"HasGarden,omitempty" json:",omitempty"`
// Indicates whether the listed property has gated entry.
HasGatedEntry *bool `xml:"HasGatedEntry,omitempty" json:",omitempty"`
// Indicates whether or not the listed property has a greenhouse.
HasGreenhouse *bool `xml:"HasGreenhouse,omitempty" json:",omitempty"`
// All the types of heating in use.
//
// Possible values:
//
// Butane Gas
// Coal
// Electric
// Geothermal
// Kerosene
// Natural Gas
// Oil
// Passive Heat Pump
// Passive Solar
// Pellet
// Propane Gas
// Solar
// Solar Panel
// Wood
// Unknown
// Other
// None
//
HeatingFuels []OtherChoice `xml:"HeatingFuels>HeatingFuel,omitempty" json:",omitempty"`
// Types of heating system.
//
// Possible values:
//
// Central Furnace
// Electric Air Filter
// Fireplace
// Fireplace - Insert
// Floor Furnace
// Floor Wall
// Forced Air
// Geothermal
// Gravity Air
// Gravity Hot Water
// Heat Pump
// Hot Water
// Hot Water Radiant Floor
// Humidifier
// Pellet Stove
// Radiant
// Radiant Ceiling
// Radiant Floor
// Radiator
// Solar Active
// Solar Passive
// Solar Active and Passive
// Space Heater
// Steam
// Stove
// S-W Changeover
// Wall Unit
// Zoned
// Unknown
// Other
// None
HeatingSystems []OtherChoice `xml:"HeatingSystems>HeatingSystem,omitempty" json:",omitempty"`
// Indicates whether the property has one or more hot tubs or spas.
HasHotTubSpa *bool `xml:"HasHotTubSpa,omitempty" json:",omitempty"`
// Indicates whether the property has an intercom.
Intercom *bool `xml:"Intercom,omitempty" json:",omitempty"`
// Indicates whether the property has one or more jetted bath tubs.
HasJettedBathTub bool `xml:"HasJettedBathTub,omitempty" json:",omitempty"`
// Indicates whether the property has a lawn.
HasLawn *bool `xml:"HasLawn,omitempty" json:",omitempty"`
// Legal description.
LegalDescription *string `xml:"LegalDescription,omitempty" json:",omitempty"`