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.place; 7 8 import diamond.core.apptype; 9 10 static if (isWeb) 11 { 12 import diamond.seo.schema.schemaobject; 13 import diamond.seo.schema.structures.postaladdress; 14 15 /// http://schema.org/Place 16 final class Place : SchemaObject 17 { 18 private: 19 /// The name. 20 string _name; 21 /// The address. 22 PostalAddress _address; 23 24 public: 25 final: 26 /// Creates a new place. 27 this() 28 { 29 super("Place"); 30 } 31 32 @property 33 { 34 /// Gets the name. 35 string name() { return _name; } 36 37 /// Sets the name. 38 void name(string newName) 39 { 40 _name = newName; 41 } 42 43 /// Gets the address. 44 PostalAddress address() { return _address; } 45 46 /// Sets the address. 47 void address(PostalAddress newAddress) 48 { 49 _address = newAddress; 50 51 super.addField("address", _address); 52 } 53 } 54 } 55 }