Qore Sap4HanaRestClient Module Reference 1.1
Loading...
Searching...
No Matches
Sap4HanaRestClient.qm.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
4/* Sap4HanaRestClient.qm Copyright (C) 2019 - 2024 Qore Technologies, s.r.o.
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23*/
24
25// minimum qore version
26
27// require type definitions everywhere
28
29// enable all warnings
30
31// don't use "$" for vars, members, and methods, assume local variable scope
32
33// do not ignore argument errors
34
35
36
87
91
92public:
94 const DefaultSendEncoding = "gzip";
95
97 const OAuth2TokenUriPath = "oauth2/apitoken/v1";
98
99private:
100 // for access based on a simple API key
101 string apikey;
102
103public:
104
106
154 constructor(hash<auto> opts, *softbool do_not_connect) ;
155
156
158 static raiseError(string fmt, ...);
159
161 static hash<auto> getOptions(hash<auto> opts);
162};
163
165
177
178public:
180 const ConnectionScheme = ...;
181
182
185
186
188 const OAuth2Options = ...;
189
190
192 const OAuth2StandardToSapOptionMap = map {$1.value: $1.key}, OAuth2Options.pairIterator();
193
195 const OAuth2DifferentOptionMap = map {$1.value: $1.key}, OAuth2Options.pairIterator(), $1.key != $1.value;
196
198
208 constructor(string name, string description, string url, hash<auto> attributes = {}, hash<auto> options = {})
209 ;
210
211
213
230 constructor(hash<auto> config, *hash<auto> attr) ;
231
232
234 string getType();
235
236
238
240 string getOAuth2OptionName(string opt);
241
242
244
246 hash<auto> getOAuth2Options();
247
248
250
255protected:
256 Sap4HanaRestClient getImpl(bool connect = True, *hash<auto> rtopts);
257public:
258
259
261protected:
262 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
263public:
264
265};
266};
static raiseError(string fmt,...)
throws an exception due to an error
constructor(hash< auto > opts, *softbool do_not_connect)
creates the object with the given options (which include the mandatory apikey option for SAP S/4Hana ...
static hash< auto > getOptions(hash< auto > opts)
returns options for the Sap4HanaRestClient::constructor()
class for SAP S/4Hana REST connections; returns Sap4HanaRestClient::Sap4HanaRestClient objects
Definition Sap4HanaRestClient.qm.dox.h:176
const OAuth2StandardToSapOptionMap
Maps standard option names to SAP REST option names.
Definition Sap4HanaRestClient.qm.dox.h:192
Sap4HanaRestClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a Sap4HanaRestClient::Sap4HanaRestClient object
string getType()
returns "sap4hanarests"
string getOAuth2OptionName(string opt)
Returns the OAuth2 option name for this connection.
const OAuth2Options
Maps SAP REST options to standard options.
Definition Sap4HanaRestClient.qm.dox.h:188
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
const OAuth2DifferentOptionMap
Different OAuth2 option map; standard name => extern name.
Definition Sap4HanaRestClient.qm.dox.h:195
const OAuth2AuthRequestOptions
options required to support the OAuth2 authorization code grant flow
Definition Sap4HanaRestClient.qm.dox.h:184
hash< auto > getOAuth2Options()
Returns OAuth2 options in a standard format.
constructor(string name, string description, string url, hash< auto > attributes={}, hash< auto > options={})
creates the Sap4HanaRestConnection object
constructor(hash< auto > config, *hash< auto > attr)
creates the Sap4HanaRestConnection object
const ConnectionScheme
Connection entry info.
Definition Sap4HanaRestClient.qm.dox.h:180
the Sap4HanaRestClient namespace contains all the objects in the Sap4HanaRestClient module
Definition Sap4HanaRestClient.qm.dox.h:85