Loading...
Searching...
No Matches
ServiceNowRestDataProvider.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace ServiceNowRestDataProvider {
class ServiceNowRestDataProvider : public DataProvider::AbstractDataProvider {
public:
ServiceNowRestClient::ServiceNowRestClient rest;
const ProviderInfo = <DataProviderInfo>{
"type": "ServiceNowRestDataProvider",
"supports_children": True,
"constructor_options": ConstructorOptions,
"children_can_support_apis": False,
"children_can_support_records": True,
"children_can_support_observers": False,
};
const ConstructorOptions = {
"api": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the ServiceNow API version to use",
},
"snrestclient": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(new Type("ServiceNowRestClient")),
"desc": "the ServiceNowRestClient object",
},
"snrestclient_options": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(AutoHashType),
"desc": "options to the ServiceNowRestClient constructor; only used if a ServiceNowRestClient object "
"is created for a call",
},
"client_id": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the client ID (required if 'client_secret' provided)",
},
"client_secret": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the client secret (required if 'client_id' provided)",
},
"username": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the username (required if 'password' provided)",
},
"password": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the password (required if 'username' provided)",
},
"url": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the URL to the ServiceNow server; overrides any URL in the schema or in any RestClient object "
"passed as an option",
},
};
const EnvOptions = {
"url": "SERVICENOW_URL",
"client_id": "SERVICENOW_CLIENT_ID",
"client_secret": "SERVICENOW_CLIENT_SECRET",
"username": "SERVICENOW_USERNAME",
"password": "SERVICENOW_PASSWORD",
};
constructor(ServiceNowRestClient::ServiceNowRestClient rest);
constructor(*hash<auto> options);
string getName();
string getDesc();
protected:
hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
public:
protected:
*list<string> getChildProviderNamesImpl();
public:
protected:
*DataProvider::AbstractDataProvider getChildProviderImpl(string name);
public:
protected:
static *hash<auto> getClientOptions(*hash<auto> copts);
public:
};
};
ServiceNowRestDataProvider::ServiceNowRestDataProvider::rest
ServiceNowRestClient::ServiceNowRestClient rest
The REST client object for API calls.
Definition: ServiceNowRestDataProvider.qc.dox.h:32
ServiceNowRestDataProvider::ServiceNowRestDataProvider::getChildProviderNamesImpl
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
ServiceNowRestDataProvider::ServiceNowRestDataProvider::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.
ServiceNowRestDataProvider::ServiceNowRestDataProvider::getName
string getName()
Returns the data provider name.
ServiceNowRestDataProvider::ServiceNowRestDataProvider::getDesc
string getDesc()
Returns the data provider description.
ServiceNowRestDataProvider::ServiceNowRestDataProvider::getChildProviderImpl
*DataProvider::AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
ServiceNowRestDataProvider::ServiceNowRestDataProvider::getStaticInfoImpl
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
ServiceNowRestDataProvider::ServiceNowRestDataProvider::getClientOptions
static *hash< auto > getClientOptions(*hash< auto > copts)
Returns options for the ServiceNowRestClient.
ServiceNowRestDataProvider::ServiceNowRestDataProvider::constructor
constructor(ServiceNowRestClient::ServiceNowRestClient rest)
Creates the object from the arguments.
ServiceNowRestDataProvider
Qore ServiceNowRestDataProvider module definition.
Definition: ServiceNowRestDataProvider.qc.dox.h:26