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,
45 const ConstructorOptions = {
46 "api": <DataProviderOptionInfo>{
47 "type": AbstractDataProviderType::get(StringType),
48 "desc":
"the ServiceNow API version to use",
50 "snrestclient": <DataProviderOptionInfo>{
51 "type": AbstractDataProviderType::get(
new Type(
"ServiceNowRestClient")),
52 "desc":
"the ServiceNowRestClient object",
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",
59 "client_id": <DataProviderOptionInfo>{
60 "type": AbstractDataProviderType::get(StringType),
61 "desc":
"the client ID (required if 'client_secret' provided)",
63 "client_secret": <DataProviderOptionInfo>{
64 "type": AbstractDataProviderType::get(StringType),
65 "desc":
"the client secret (required if 'client_id' provided)",
67 "username": <DataProviderOptionInfo>{
68 "type": AbstractDataProviderType::get(StringType),
69 "desc":
"the username (required if 'password' provided)",
71 "password": <DataProviderOptionInfo>{
72 "type": AbstractDataProviderType::get(StringType),
73 "desc":
"the password (required if 'username' provided)",
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",
84 "url":
"SERVICENOW_URL",
85 "client_id":
"SERVICENOW_CLIENT_ID",
86 "client_secret":
"SERVICENOW_CLIENT_SECRET",
87 "username":
"SERVICENOW_USERNAME",
88 "password":
"SERVICENOW_PASSWORD",
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