1 /**
2 * Copyright © DiamondMVC 2019
3 * License: MIT (https://github.com/DiamondMVC/Diamond/blob/master/LICENSE)
4 * Author: Jacob Jensen (bausshf)
5 */
6 module diamond.seo.schema.structures.postaladdress;
7 
8 import diamond.core.apptype;
9 
10 static if (isWeb)
11 {
12   import diamond.seo.schema.schemaobject;
13 
14   /// http://schema.org/PostalAddress
15   final class PostalAddress : SchemaObject
16   {
17     private:
18     /// The address locality.
19     string _addressLocality;
20     /// The postal code.
21     string _postalCode;
22     /// The street address.
23     string _streetAddress;
24     /// The address region.
25     string _addressRegion;
26     /// The address country.
27     string _addressCountry;
28     /// The name.
29     string _name;
30     /// The post office box number.
31     string _postOfficeBoxNumber;
32 
33     public:
34     final:
35     /// Creates a new postal address.
36     this()
37     {
38       super("PostalAddress");
39     }
40 
41     @property
42     {
43       /// Gets the address locality.
44       string addressLocality() { return _addressLocality; }
45 
46       /// Sets the address locality.
47       void addressLocality(string newAddressLocality)
48       {
49         _addressLocality = newAddressLocality;
50 
51         super.addField("addressLocality", _addressLocality);
52       }
53 
54       /// Gets the postal code.
55       string postalCode() { return _postalCode; }
56 
57       //// Sets the postal code.
58       void postalCode(string newPostalCode)
59       {
60         _postalCode = newPostalCode;
61 
62         super.addField("postalCode", _postalCode);
63       }
64 
65       /// Gets the street address.
66       string streetAddress() { return _streetAddress; }
67 
68       /// Sets the street address.
69       void streetAddress(string newStreetAddress)
70       {
71         _streetAddress = newStreetAddress;
72 
73         super.addField("streetAddress", _streetAddress);
74       }
75 
76       /// Gets the address region.
77       string addressRegion() { return _addressRegion; }
78 
79       /// Sets the address region.
80       void addressRegion(string newAddressRegion)
81       {
82         _addressRegion = newAddressRegion;
83 
84         super.addField("addressRegion", _addressRegion);
85       }
86 
87       /// Gets the address country.
88       string addressCountry() { return _addressCountry; }
89 
90       /// Sets the address country.
91       void addressCountry(string newAddressCountry)
92       {
93         _addressCountry = newAddressCountry;
94 
95         super.addField("addressCountry", _addressCountry);
96       }
97 
98       /// Gets the name.
99       string name() { return _name; }
100 
101       /// Sets the name.
102       void name(string newName)
103       {
104         _name = newName;
105 
106         super.addField("name", _name);
107       }
108 
109       /// Gets the post office box number.
110       string postOfficeBoxNumber() { return _postOfficeBoxNumber; }
111 
112       /// Sets the post office box number.
113       void postOfficeBoxNumber(string newPostOfficeBoxNumber)
114       {
115         _postOfficeBoxNumber = newPostOfficeBoxNumber;
116 
117         super.addField("postOfficeBoxNumber", _postOfficeBoxNumber);
118       }
119     }
120   }
121 }