$darkmode
Qore ElasticSearchDataProvider Module Reference 1.0
ElasticSearchIndexCreateDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
26 namespace ElasticSearchDataProvider {
28 
31 
32 public:
34  const ProviderInfo = <DataProviderInfo>{
35  "name": "create",
36  "desc": "ElasticSearch index create API data provider",
37  "type": "ElasticSearchIndexCreateDataProvider",
38  "constructor_options": ElasticSearchDataProvider::ConstructorOptions,
39  "supports_request": True,
40  };
41 
43  const ProviderSummaryInfo = cast<hash<DataProviderSummaryInfo>>(ProviderInfo{
44  AbstractDataProvider::DataProviderSummaryInfoKeys
45  });
46 
49 
52 
54  const QueryArgs = ("wait_for_active_shards", "master_timeout", "timeout");
55 
57  constructor(*hash<auto> options);
58 
59 
62 
63 
65  string getName();
66 
67 
69  *string getDesc();
70 
71 
73 
78 protected:
79  auto doRequestImpl(auto req, *hash<auto> request_options);
80 public:
81 
82 
84 
86 protected:
88 public:
89 
90 
92 
94 protected:
96 public:
97 
98 
100  hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
101 
102 };
103 
106 
107 public:
108  constructor() ;
109 
110 };
111 
114 
115 public:
116 protected:
118  const Fields = {
119  // query parameters
120  "index": {
121  "type": StringType,
122  "desc": "The name of the index to create",
123  },
124  "wait_for_active_shards": {
125  "type": SoftStringOrNothingType,
126  "desc": "The number of shard copies that must be active before proceeding with the operation. "
127  "Set to `all` or any positive integer up to the total number of shards in the "
128  "index (number_of_replicas+1). Default: `1`, the primary shard.",
129  },
130  "master_timeout": {
131  "type": StringOrNothingType,
132  "desc": "Period to wait for a connection to the master node (default `30s`). If no response is "
133  "received before the timeout expires, the request fails and returns an error",
134  },
135  "timeout": {
136  "type": StringOrNothingType,
137  "desc": "Period to wait for a response (default `30s`). If no response is received before the "
138  "timeout expires, the request fails and returns an error",
139  },
140 
141  # body parameters
142  "aliases": {
143  "type": new ElasticSearchIndexAliasesDataType(),
144  "desc": "The key is the alias name. Index alias names support date math",
145  },
146  "mappings": {
147  "type": AutoHashOrNothingType,
148  "desc": "Mapping for fields in the index. If specified, this mapping can include:\n"
149  "- Field names\n"
150  "- Field data types\n"
151  "- Mapping parameters",
152  },
153  "settings": {
154  "type": AutoHashOrNothingType,
155  "desc": "Configuration options for the index",
156  },
157  };
158 
159 public:
160 
163 
164 };
165 
168 
169 public:
170 protected:
172  const Fields = {
173  "shards_acknowledged": {
174  "type": BoolType,
175  "desc": "Indicates whether the requisite number of shard copies were started for each shard in the "
176  "index before timing out",
177  },
178  "index": {
179  "type": StringType,
180  "desc": "The name of the index created",
181  },
182  };
183 
184 public:
185 
188 
189 };
190 };
The acknowledged response type.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:28
The AWS REST client base data provider class.
Definition: ElasticSearchDataProviderBase.qc.dox.h:28
const ConstructorOptions
Constructor options.
Definition: ElasticSearchDataProvider.qc.dox.h:61
Aliases data type.
Definition: ElasticSearchIndexCreateDataProvider.qc.dox.h:105
The ElasticSearch index create API data provider.
Definition: ElasticSearchIndexCreateDataProvider.qc.dox.h:30
const ProviderSummaryInfo
Provider summary info.
Definition: ElasticSearchIndexCreateDataProvider.qc.dox.h:43
constructor(RestClient::RestClient rest)
Creates the object from a REST connection.
const ResponseType
Response type.
Definition: ElasticSearchIndexCreateDataProvider.qc.dox.h:51
const RequestType
Request type.
Definition: ElasticSearchIndexCreateDataProvider.qc.dox.h:48
*DataProvider::AbstractDataProviderType getRequestTypeImpl()
Returns the description of a successful request message, if any.
constructor(*hash< auto > options)
Creates the object from constructor options.
*DataProvider::AbstractDataProviderType getResponseTypeImpl()
Returns the description of a response message, if this object represents a response message.
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
const QueryArgs
Query args.
Definition: ElasticSearchIndexCreateDataProvider.qc.dox.h:54
*string getDesc()
Returns the data provider description.
const ProviderInfo
Provider info.
Definition: ElasticSearchIndexCreateDataProvider.qc.dox.h:34
auto doRequestImpl(auto req, *hash< auto > request_options)
Makes a request and returns the response.
Create index request data type.
Definition: ElasticSearchIndexCreateDataProvider.qc.dox.h:113
const Fields
Field descriptions.
Definition: ElasticSearchIndexCreateDataProvider.qc.dox.h:118
Index create API response.
Definition: ElasticSearchIndexCreateDataProvider.qc.dox.h:167
const Fields
Field descriptions.
Definition: ElasticSearchIndexCreateDataProvider.qc.dox.h:172
Base data type for search request types.
Definition: ElasticSearchIndexDataTypeBase.qc.dox.h:28
const True
Qore ElasticSearchDataProvider module definition.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:26