$darkmode
Qore EmpathicBuildingDataProvider Module Reference 1.0
EmpathicBuildingDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
29 
30 public:
32  string uri_path = "/";
33 
35  string display_name;
36 
38  const ProviderInfo = <DataProviderInfo>{
39  "type": "EmpathicBuildingDataProvider",
40  "supports_children": True,
41  "constructor_options": ConstructorOptions,
42  "children_can_support_apis": True,
43  };
44 
46  const ConstructorOptions = {
47  "restclient": <DataProviderOptionInfo>{
48  "type": AbstractDataProviderType::get(new Type("RestClient")),
49  "desc": "The RestClient object",
50  },
51  "url": <DataProviderOptionInfo>{
52  "type": AbstractDataProviderTypeMap."string",
53  "desc": "The URL to the REST server; overrides any URL in any RestClient object passed as an option",
54  "default_value": "https://eu-api.empathicbuilding.com",
55  },
56  "restclient_options": <DataProviderOptionInfo>{
57  "type": AbstractDataProviderTypeMap."*hash",
58  "desc": "Options to the RestClient constructor; only used if a RestClient object is created for a "
59  "call",
60  },
61  "token": <DataProviderOptionInfo>{
62  "type": AbstractDataProviderTypeMap."string",
63  "desc": "A gateway token to use for authentication to the server",
64  "sensitive": True,
65  },
66  };
67 
68 protected:
69  const ChildMap = {
70  "measurements": Class::forName("EmpathicBuildingDataProvider::EmpathicBuildingMeasurementsDataProvider"),
71  };
72 
73 public:
74 
76  constructor(*hash<auto> options);
77 
78 
81 
82 
83  static RestClient::RestClient getRestConnection(*hash<auto> options);
84 
86  string getName();
87 
88 
90  *string getDesc();
91 
92 
94  *list<hash<DataProvider::DataProviderSummaryInfo>> getChildProviderSummaryInfo();
95 
96 
98 
100 protected:
101  *list<string> getChildProviderNamesImpl();
102 public:
103 
104 
106 
110 protected:
112 public:
113 
114 
116 protected:
117  hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
118 public:
119 
120 };
121 
124 
126 const SoftBoolDataProviderStringType = AbstractDataProviderType::get(SoftBoolStringType);
127 
129 class SoftBoolStringType : public Qore::Reflection::Type {
130 
131 public:
134 
135 
137  auto acceptsValue(auto value);
138 
139 
142 
143 };
144 };
The EmpathicBuilding data provider class.
Definition: EmpathicBuildingDataProviderBase.qc.dox.h:28
constructor(RestClient::RestClient rest)
Create the object from the REST connection.
string display_name
The value to returns as the name of the object.
Definition: EmpathicBuildingDataProvider.qc.dox.h:35
*string getDesc()
Returns the data provider description.
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
*DataProvider::AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
string getName()
Returns the data provider name.
*list< hash< DataProvider::DataProviderSummaryInfo > > getChildProviderSummaryInfo()
Return data provider summary info.
constructor(*hash< auto > options)
Creates the object from constructor options.
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
Boolean string type.
Definition: EmpathicBuildingDataProvider.qc.dox.h:129
auto getDefaultValue()
Returns the default value for the type or NOTHING if the type has no default value.
auto acceptsValue(auto value)
Returns the value after any conversions by the type.
const True
Qore EmpathicBuildingDataProvider module definition.
Definition: EmpathicBuildingDataProvider.qc.dox.h:26
const SoftBoolDataProviderStringType
Boolean data provider string type for query parameters.
Definition: EmpathicBuildingDataProvider.qc.dox.h:126
const SoftBoolStringType
Boolean string type for query parameters.
Definition: EmpathicBuildingDataProvider.qc.dox.h:123