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.contactpoint;
7 
8 import diamond.core.apptype;
9 
10 static if (isWeb)
11 {
12   import diamond.seo.schema.schemaobject;
13 
14   /// http://schema.org/ContactPoint
15   final class ContactPoint : SchemaObject
16   {
17     private:
18     /// The telephone.
19     string _telephone;
20     /// The contact type.
21     string _contactType;
22     /// The contact option.
23     string[] _contactOption;
24     /// The area served.
25     string _areaServed;
26     /// The available language.
27     string _availableLanguage;
28 
29     public:
30     final:
31     /// Creates a new contact point.
32     this()
33     {
34       super("ContactPoint");
35     }
36 
37     @property
38     {
39       /// Gets the telephone.
40       string telephone() { return _telephone; }
41 
42       /// Sets the telephone.
43       void telephone(string newTelephone)
44       {
45         _telephone = newTelephone;
46 
47         super.addField("telephone", _telephone);
48       }
49 
50       /// Gets the contact type.
51       string contactType() { return _contactType; }
52 
53       /// Sets the contact type.
54       void contactType(string newContactType)
55       {
56         _contactType = newContactType;
57 
58         super.addField("contactType", _contactType);
59       }
60 
61       /// Gets the contact option.
62       string[] contactOption() { return _contactOption; }
63 
64       /// Sets the contact option.
65       void contactOption(string[] newContactOption)
66       {
67         _contactOption = newContactOption;
68 
69         super.addField("contactOption", _contactOption);
70       }
71 
72       /// Gets the area served.
73       string areaServed() { return _areaServed; }
74 
75       /// Sets the area served.
76       void areaServed(string newAreaServed)
77       {
78         _areaServed = newAreaServed;
79 
80         super.addField("areaServed", _areaServed);
81       }
82 
83       /// Gets the available langauge.
84       string availableLanguage() { return _availableLanguage; }
85 
86       /// Sets the available language.
87       void availableLanguage(string newAvailableLanguage)
88       {
89         _availableLanguage = newAvailableLanguage;
90 
91         super.addField("availableLanguage", _availableLanguage);
92       }
93     }
94   }
95 }