Qore ServiceNowRestDataProvider Module Reference 1.2.1
Loading...
Searching...
No Matches
ServiceNowRestDataProvider.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
29
30public:
32 const ProviderInfo = <DataProviderInfo>{
33 "type": "ServiceNowRestDataProvider",
34 "supports_children": True,
35 "constructor_options": ConstructorOptions,
36 "children_can_support_apis": False,
37 "children_can_support_records": True,
38 "children_can_support_observers": False,
39 };
40
42 const ConstructorOptions = {
43 "api": <DataProviderOptionInfo>{
44 "type": AbstractDataProviderType::get(StringType),
45 "desc": "the ServiceNow API version to use",
46 },
47 "snrestclient": <DataProviderOptionInfo>{
48 "type": AbstractDataProviderType::get(new Type("ServiceNowRestClient")),
49 "desc": "the ServiceNowRestClient object",
50 },
51 "snrestclient_options": <DataProviderOptionInfo>{
52 "type": AbstractDataProviderType::get(AutoHashType),
53 "desc": "options to the ServiceNowRestClient constructor; only used if a ServiceNowRestClient object "
54 "is created for a call",
55 },
56 "client_id": <DataProviderOptionInfo>{
57 "type": AbstractDataProviderType::get(StringType),
58 "desc": "the client ID (required if 'client_secret' provided)",
59 },
60 "client_secret": <DataProviderOptionInfo>{
61 "type": AbstractDataProviderType::get(StringType),
62 "desc": "the client secret (required if 'client_id' provided)",
63 },
64 "username": <DataProviderOptionInfo>{
65 "type": AbstractDataProviderType::get(StringType),
66 "desc": "the username (required if 'password' provided)",
67 },
68 "password": <DataProviderOptionInfo>{
69 "type": AbstractDataProviderType::get(StringType),
70 "desc": "the password (required if 'username' provided)",
71 },
72 "url": <DataProviderOptionInfo>{
73 "type": AbstractDataProviderType::get(StringType),
74 "desc": "the URL to the ServiceNow server; overrides any URL in the schema or in any RestClient object "
75 "passed as an option",
76 },
77 };
78
80 const EnvOptions = {
81 "url": "SERVICENOW_URL",
82 "client_id": "SERVICENOW_CLIENT_ID",
83 "client_secret": "SERVICENOW_CLIENT_SECRET",
84 "username": "SERVICENOW_USERNAME",
85 "password": "SERVICENOW_PASSWORD",
86 };
87
90
91
93 constructor(*hash<auto> options);
94
95
97 string getName();
98
99
101 string getDesc();
102
103
105protected:
106 hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
107public:
108
109
111
113protected:
115public:
116
117
119
123protected:
125public:
126
127
129protected:
130 static *hash<auto> getClientOptions(*hash<auto> copts);
131public:
132
133};
134};
The ServiceNowRest data provider class.
Definition: ServiceNowRestDataProviderBase.qc.dox.h:28
*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