Loading...
Searching...
No Matches
ElasticSearchDocumentCreateDataProvider.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace ElasticSearchDataProvider {
class ElasticSearchDocumentCreateDataProvider : public ElasticSearchDataProviderBase {
public:
const ProviderInfo = <DataProviderInfo>{
"name": "create",
"desc": "ElasticSearch document create API data provider",
"type": "ElasticSearchDocumentCreateDataProvider",
"constructor_options": ElasticSearchDataProvider::ConstructorOptions,
"supports_request": True,
};
const ProviderSummaryInfo = cast<hash<DataProviderSummaryInfo>>(ProviderInfo{
AbstractDataProvider::DataProviderSummaryInfoKeys
});
const RequestType = new ElasticSearchDocumentCreateRequestDataType();
const ResponseType = new ElasticSearchDocumentCreateResponseDataType();
const QueryArgs = ...;
constructor(*hash<auto> options);
constructor(RestClient::RestClient rest) ;
string getName();
*string getDesc();
protected:
auto doRequestImpl(auto req, *hash<auto> request_options);
public:
protected:
*DataProvider::AbstractDataProviderType getRequestTypeImpl();
public:
protected:
*DataProvider::AbstractDataProviderType getResponseTypeImpl();
public:
hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
};
class ElasticSearchDocumentCreateRequestDataType : public DataProvider::HashDataType {
public:
protected:
const Fields = {
// query parameters
"index": {
"type": StringType,
"desc": "The name of the index to use",
},
"if_seq_no": {
"type": IntOrNothingType,
"desc": "Only perform the operation if the document has this sequence number",
},
"if_primary_term": {
"type": IntOrNothingType,
"desc": "Only perform the operation if the document has this primary term",
},
"op_type": {
"type": StringOrNothingType,
"desc": "Set to create to only index the document if it does not already exist (put if absent). If a "
"document with the specified `_id` already exists, the indexing operation will fail. Same as "
"using the `<index>/_create` endpoint. Valid values: `index`, `create`. If document id is "
"specified, it defaults to `index`. Otherwise, it defaults to `create`",
},
"pipeline": {
"type": StringOrNothingType,
"desc": "ID of the pipeline to use to preprocess incoming documents. If the index has a default "
"ingest pipeline specified, then setting the value to _none disables the default ingest pipeline "
"for this request. If a final pipeline is configured it will always run, regardless of the value "
"of this parameter",
},
"refresh": {
"type": StringOrNothingType,
"desc": "If `true` (default: `false`), Elasticsearch refreshes the affected shards to make this operation visible to "
"search, if `wait_for` then wait for a refresh to make this operation visible to search, if "
"`false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`",
},
"routing": {
"type": StringOrNothingType,
"desc": "Custom value used to route operations to a specific shard",
},
"timeout": {
"type": StringOrNothingType,
"desc": "Period to wait for a response (default: `1m`). If no response is received before the "
"timeout expires, the request fails and returns an error",
},
"version": {
"type": IntOrNothingType,
"desc": "Explicit version number for concurrency control. The specified version must match the "
"current version of the document for the request to succeed",
},
"version_type": {
"type": StringOrNothingType,
"desc": "Specific version type: `external`, `external_gte`",
},
"wait_for_active_shards": {
"type": StringOrNothingType,
"desc": "The number of shard copies that must be active before proceeding with the operation "
"(default `1`). Set to `all` or any positive integer up to the total number of shards in the "
"index (number_of_replicas+1)",
},
"require_alias": {
"type": SoftBoolStringType,
"desc": "If `true` (default `false`), the destination must be an index alias",
},
};
public:
constructor();
};
class ElasticSearchDocumentCreateShardsDataType : public DataProvider::HashDataType {
public:
protected:
const Fields = {
"total": {
"type": IntType,
"desc": "Indicates how many shard copies (primary and replica shards) the index operation should be "
"executed on",
},
"successful": {
"type": IntType,
"desc": "Indicates the number of shard copies the index operation succeeded on. When the index "
"operation is successful, `successful` is at least 1.\n\n"
"Replica shards might not all be started when an indexing operation returns successfully; ​by "
"default, only the primary is required. Set `wait_for_active_shards` to change this default "
"behavior",
},
"failed": {
"type": IntType,
"desc": "An array that contains replication-related errors in the case an index operation failed on "
"a replica shard. `0` indicates there were no failures.",
},
};
public:
constructor();
};
class ElasticSearchDocumentCreateResponseDataType : public DataProvider::HashDataType {
public:
protected:
const Fields = {
"_index": {
"type": StringType,
"desc": "The name of the index the document was added to",
},
"_id": {
"type": StringType,
"desc": "The unique identifier for the added document",
},
"_version": {
"type": IntType,
"desc": "The document version. Incremented each time the document is updated",
},
"result": {
"type": StringType,
"desc": "The result of the indexing operation, `created` or `updated`",
},
"_shards": {
"type": new ElasticSearchDocumentCreateShardsDataType(),
"desc": "Provides information about the replication process of the index operation",
},
"_seq_no": {
"type": IntType,
"desc": "The sequence number assigned to the document for the indexing operation. Sequence numbers "
"are used to ensure an older version of a document doesn’t overwrite a newer version",
},
"_primary_term": {
"type": IntType,
"desc": "The primary term assigned to the document for the indexing operation",
},
"_type": {
"type": StringOrNothingType,
"desc": "The document type. Elasticsearch indices now support a single document type, `_doc`"
},
};
public:
constructor();
};
};
DataProvider::AbstractDataProviderType
DataProvider::HashDataType
ElasticSearchDataProvider::ElasticSearchDataProviderBase
The AWS REST client base data provider class.
Definition: ElasticSearchDataProviderBase.qc.dox.h:28
ElasticSearchDataProvider::ElasticSearchDataProvider::ConstructorOptions
const ConstructorOptions
Constructor options.
Definition: ElasticSearchDataProvider.qc.dox.h:61
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider
The ElasticSearch document create API data provider.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:32
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::doRequestImpl
auto doRequestImpl(auto req, *hash< auto > request_options)
Makes a request and returns the response.
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::getDesc
*string getDesc()
Returns the data provider description.
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::ResponseType
const ResponseType
Response type.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:53
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::constructor
constructor(RestClient::RestClient rest)
Creates the object from a REST connection.
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::RequestType
const RequestType
Request type.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:50
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::QueryArgs
const QueryArgs
Query args.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:56
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::getRequestTypeImpl
*DataProvider::AbstractDataProviderType getRequestTypeImpl()
Returns the description of a successful request message, if any.
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::getName
string getName()
Returns the data provider name.
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::getStaticInfoImpl
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::ProviderInfo
const ProviderInfo
Provider info.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:36
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::getResponseTypeImpl
*DataProvider::AbstractDataProviderType getResponseTypeImpl()
Returns the description of a response message, if this object represents a response message.
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.
ElasticSearchDataProvider::ElasticSearchDocumentCreateDataProvider::ProviderSummaryInfo
const ProviderSummaryInfo
Provider summary info.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:45
ElasticSearchDataProvider::ElasticSearchDocumentCreateRequestDataType
Create document request data type.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:108
ElasticSearchDataProvider::ElasticSearchDocumentCreateRequestDataType::Fields
const Fields
Field descriptions.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:113
ElasticSearchDataProvider::ElasticSearchDocumentCreateRequestDataType::constructor
constructor()
Creates the object.
ElasticSearchDataProvider::ElasticSearchDocumentCreateResponseDataType
Document create API response.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:219
ElasticSearchDataProvider::ElasticSearchDocumentCreateResponseDataType::constructor
constructor()
Creates the object.
ElasticSearchDataProvider::ElasticSearchDocumentCreateResponseDataType::Fields
const Fields
Field descriptions.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:224
ElasticSearchDataProvider::ElasticSearchDocumentCreateShardsDataType
Shard data type.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:185
ElasticSearchDataProvider::ElasticSearchDocumentCreateShardsDataType::constructor
constructor()
Creates the object.
ElasticSearchDataProvider::ElasticSearchDocumentCreateShardsDataType::Fields
const Fields
Field descriptions.
Definition: ElasticSearchDocumentCreateDataProvider.qc.dox.h:190
ElasticSearchDataProvider::SoftBoolStringType
Boolean string type.
Definition: ElasticSearchDataProvider.qc.dox.h:141
RestClient::RestClient
ElasticSearchDataProvider
Qore ElasticSearchDataProvider module definition.
Definition: ElasticSearchAcknowledgedDataType.qc.dox.h:26