Qore ServiceNowRestDataProvider Module Reference 1.2
Loading...
Searching...
No Matches
ServiceNowRestDataProvider.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
29
30public:
33
35 const ProviderInfo = <DataProviderInfo>{
36 "type": "ServiceNowRestDataProvider",
37 "supports_children": True,
38 "constructor_options": ConstructorOptions,
39 "children_can_support_apis": False,
40 "children_can_support_records": True,
41 "children_can_support_observers": False,
42 };
43
45 const ConstructorOptions = {
46 "api": <DataProviderOptionInfo>{
47 "type": AbstractDataProviderType::get(StringType),
48 "desc": "the ServiceNow API version to use",
49 },
50 "snrestclient": <DataProviderOptionInfo>{
51 "type": AbstractDataProviderType::get(new Type("ServiceNowRestClient")),
52 "desc": "the ServiceNowRestClient object",
53 },
54 "snrestclient_options": <DataProviderOptionInfo>{
55 "type": AbstractDataProviderType::get(AutoHashType),
56 "desc": "options to the ServiceNowRestClient constructor; only used if a ServiceNowRestClient object "
57 "is created for a call",
58 },
59 "client_id": <DataProviderOptionInfo>{
60 "type": AbstractDataProviderType::get(StringType),
61 "desc": "the client ID (required if 'client_secret' provided)",
62 },
63 "client_secret": <DataProviderOptionInfo>{
64 "type": AbstractDataProviderType::get(StringType),
65 "desc": "the client secret (required if 'client_id' provided)",
66 },
67 "username": <DataProviderOptionInfo>{
68 "type": AbstractDataProviderType::get(StringType),
69 "desc": "the username (required if 'password' provided)",
70 },
71 "password": <DataProviderOptionInfo>{
72 "type": AbstractDataProviderType::get(StringType),
73 "desc": "the password (required if 'username' provided)",
74 },
75 "url": <DataProviderOptionInfo>{
76 "type": AbstractDataProviderType::get(StringType),
77 "desc": "the URL to the ServiceNow server; overrides any URL in the schema or in any RestClient object "
78 "passed as an option",
79 },
80 };
81
83 const EnvOptions = {
84 "url": "SERVICENOW_URL",
85 "client_id": "SERVICENOW_CLIENT_ID",
86 "client_secret": "SERVICENOW_CLIENT_SECRET",
87 "username": "SERVICENOW_USERNAME",
88 "password": "SERVICENOW_PASSWORD",
89 };
90
93
94
96 constructor(*hash<auto> options);
97
98
100 string getName();
101
102
104 string getDesc();
105
106
108protected:
109 hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
110public:
111
112
114
116protected:
118public:
119
120
122
126protected:
128public:
129
130
132protected:
133 static *hash<auto> getClientOptions(*hash<auto> copts);
134public:
135
136};
137};
ServiceNowRestClient::ServiceNowRestClient rest
The REST client object for API calls.
Definition: ServiceNowRestDataProvider.qc.dox.h:32
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
constructor(*hash< auto > options)
Creates the object from constructor options.
string getName()
Returns the data provider name.
string getDesc()
Returns the data provider description.
*DataProvider::AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
static *hash< auto > getClientOptions(*hash< auto > copts)
Returns options for the ServiceNowRestClient.
constructor(ServiceNowRestClient::ServiceNowRestClient rest)
Creates the object from the arguments.
Qore ServiceNowRestDataProvider module definition.
Definition: ServiceNowRestDataProvider.qc.dox.h:26