# DTOs.hpp
This File On Github
Ask A Question
API: latest
module: oatpp-consul
#include "oatpp-consul/rest/DTOs.hpp"
# KVMetadata
DTO object representing Consul KV Metadata Response.
For More info see Consul KV Store Endpoints.
namespace oatpp { namespace consul { namespace rest {
class KVMetadata : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | key | Full path of the entry. |
String | value | Value. May contain base64 encoded value if no "raw" parameter were specified in request ex.: "v1/kv/{key}?raw" . |
String | session | Session. |
Int32 | createIndex | Internal index value that represents when the entry was created. |
Int32 | modifyIndex | Last index that modified this key. |
Int32 | lockIndex | The number of times this key has successfully been acquired in a lock. If the lock is held, the Session key provides the session that owns the lock. |
Int32 | flags | An opaque unsigned integer that can be attached to each entry. |
# Methods
Return Type | Name | Summary |
---|---|---|
String | getValueDecoded | Get base64 decoded KVMetadata::value. |
# KVMetadata::key
Full path of the entry.
DTO_FIELD(String, key, "Key")
# KVMetadata::value
Value.
May contain base64 encoded value if no "raw" parameter were specified in request ex.:"v1/kv/{key}?raw"
.
DTO_FIELD(String, value, "Value")
# KVMetadata::session
Session.
DTO_FIELD(String, session, "Session")
# KVMetadata::createIndex
Internal index value that represents when the entry was created.
DTO_FIELD(Int32, createIndex, "CreateIndex")
# KVMetadata::modifyIndex
Last index that modified this key.
DTO_FIELD(Int32, modifyIndex, "ModifyIndex")
# KVMetadata::lockIndex
The number of times this key has successfully been acquired in a lock. If the lock is held, the Session key provides the session that owns the lock.
DTO_FIELD(Int32, lockIndex, "LockIndex")
# KVMetadata::flags
An opaque unsigned integer that can be attached to each entry.
DTO_FIELD(Int32, flags, "Flags")
# KVMetadata::getValueDecoded
Get base64 decoded KVMetadata::value.
- @return - decoded KVMetadata::value.
String getValueDecoded() const
# AgentCheckRegisterPayload
DTO Object representing Consul Agent Register Check.
For more information see Consul Agent Register Check.
namespace oatpp { namespace consul { namespace rest {
class AgentCheckRegisterPayload : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | name | Name of the check. |
String | id | Unique ID for this check on the node. |
String | interval | Frequency at which to run this check. |
String | notes | Arbitrary information. |
String | deregisterCriticalServiceAfter | Specifies that checks associated with a service should deregister after this time. |
List<String> | args | Command arguments to run to update the status of the check. |
String | dockerContainerID | Specifies that the check is a Docker check. |
String | grpc | Specifies a gRPC check's endpoint that supports the standard gRPC health checking protocol. |
Boolean | grpcUseTLS | Set true to use TLS for this gRPC health check. |
String | http | HTTP check's endpoint. Default Method is GET. |
String | method | Specifies a different HTTP method to be used for an HTTP check. If not specified GET is used. |
Fields<List<String>> | header | Set of headers that should be set for HTTP checks. |
String | timeout | Timeout for outgoing connections |
Boolean | tlsSkipVerify | Specifies if the certificate for an HTTPS check should not be verified. |
String | tcp | Specifies a TCP to connect against the value of TCP (expected to be an IP or hostname plus port combination) every Interval. |
String | ttl | Specifies this is a TTL check, and the TTL endpoint must be used periodically to update the state of the check. |
String | serviceID | Specifies the ID of a service to associate the registered check with an existing service provided by the agent. |
String | status | Initial status of the health check. |
# AgentCheckRegisterPayload::name
Name of the check.
DTO_FIELD(String, name, "Name")
# AgentCheckRegisterPayload::id
Unique ID for this check on the node.
DTO_FIELD(String, id, "ID")
# AgentCheckRegisterPayload::interval
Frequency at which to run this check.
DTO_FIELD(String, interval, "Interval")
# AgentCheckRegisterPayload::notes
Arbitrary information.
DTO_FIELD(String, notes, "Notes")
# AgentCheckRegisterPayload::deregisterCriticalServiceAfter
Specifies that checks associated with a service should deregister after this time.
DTO_FIELD(String, deregisterCriticalServiceAfter, "DeregisterCriticalServiceAfter")
# AgentCheckRegisterPayload::args
Command arguments to run to update the status of the check.
DTO_FIELD(List<String>, args, "Args")
# AgentCheckRegisterPayload::dockerContainerID
Specifies that the check is a Docker check.
DTO_FIELD(String, dockerContainerID, "DockerContainerID")
# AgentCheckRegisterPayload::grpc
Specifies a gRPC check's endpoint that supports the standard gRPC health checking protocol.
DTO_FIELD(String, grpc, "GRPC")
# AgentCheckRegisterPayload::grpcUseTLS
Set true
to use TLS for this gRPC health check.
DTO_FIELD(Boolean, grpcUseTLS, "GRPCUseTLS")
# AgentCheckRegisterPayload::http
HTTP check's endpoint. Default Method is GET.
DTO_FIELD(String, http, "HTTP")
# AgentCheckRegisterPayload::method
Specifies a different HTTP method to be used for an HTTP check. If not specified GET is used.
DTO_FIELD(String, method, "Method")
# AgentCheckRegisterPayload::header
Set of headers that should be set for HTTP checks.
DTO_FIELD(Fields<List<String>>, header, "Header")
# AgentCheckRegisterPayload::timeout
Timeout for outgoing connections
DTO_FIELD(String, timeout, "Timeout")
# AgentCheckRegisterPayload::tlsSkipVerify
Specifies if the certificate for an HTTPS check should not be verified.
DTO_FIELD(Boolean, tlsSkipVerify, "TLSSkipVerify")
# AgentCheckRegisterPayload::tcp
Specifies a TCP to connect against the value of TCP (expected to be an IP or hostname plus port combination) every Interval.
DTO_FIELD(String, tcp, "TCP")
# AgentCheckRegisterPayload::ttl
Specifies this is a TTL check, and the TTL endpoint must be used periodically to update the state of the check.
DTO_FIELD(String, ttl, "TTL")
# AgentCheckRegisterPayload::serviceID
Specifies the ID of a service to associate the registered check with an existing service provided by the agent.
DTO_FIELD(String, serviceID, "ServiceID")
# AgentCheckRegisterPayload::status
Initial status of the health check.
DTO_FIELD(String, status, "Status")
# AgentServiceRegisterPayload
DTO Object representing Consul Agent Register Service.
For more information see Consul Agent Register Service.
namespace oatpp { namespace consul { namespace rest {
class AgentServiceRegisterPayload : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | name | Logical name of the service. |
String | id | Unique ID for this service. |
List<String> | tags | List of tags to assign to the service. |
String | address | Specifies the address of the service. If not provided, the agent's address is used as the address for the service during DNS queries. |
Fields<String> | meta | Specifies arbitrary KV metadata linked to the service instance. |
Int32 | port | Port of the service. |
String | kind | The kind of service. Defaults to "" which is a typical Consul service. This value may also be "connect-proxy" for services that are Connect-capable proxies representing another service. |
String | proxyDestination | Deprecated. |
Object<AgentCheckRegisterPayload> | check | AgentCheckRegisterPayload. |
List<Object<AgentCheckRegisterPayload>> | checks | List of AgentCheckRegisterPayload. |
Boolean | enableTagOverride | Specifies to disable the anti-entropy feature for this service's tags. |
# AgentServiceRegisterPayload::name
Logical name of the service.
DTO_FIELD(String, name, "Name")
# AgentServiceRegisterPayload::id
Unique ID for this service.
DTO_FIELD(String, id, "ID")
# AgentServiceRegisterPayload::tags
List of tags to assign to the service.
DTO_FIELD(List<String>, tags, "Tags")
# AgentServiceRegisterPayload::address
Specifies the address of the service. If not provided, the agent's address is used as the address for the service during DNS queries.
DTO_FIELD(String, address, "Address")
# AgentServiceRegisterPayload::meta
Specifies arbitrary KV metadata linked to the service instance.
DTO_FIELD(Fields<String>, meta, "Meta")
# AgentServiceRegisterPayload::port
Port of the service.
DTO_FIELD(Int32, port, "Port")
# AgentServiceRegisterPayload::kind
The kind of service. Defaults to "" which is a typical Consul service. This value may also be "connect-proxy" for services that are Connect-capable proxies representing another service.
DTO_FIELD(String, kind, "Kind")
# AgentServiceRegisterPayload::proxyDestination
Deprecated.
DTO_FIELD(String, proxyDestination, "ProxyDestination")
# AgentServiceRegisterPayload::check
DTO_FIELD(Object<AgentCheckRegisterPayload>, check, "Check")
# AgentServiceRegisterPayload::checks
List of AgentCheckRegisterPayload.
DTO_FIELD(List<Object<AgentCheckRegisterPayload>>, checks, "Checks")
# AgentServiceRegisterPayload::enableTagOverride
Specifies to disable the anti-entropy feature for this service's tags.
DTO_FIELD(Boolean, enableTagOverride, "EnableTagOverride")
# SessionPayload
DTO Object representing Consul Agent Session.
For more information see Consul Session HTTP Endpoint.
namespace oatpp { namespace consul { namespace rest {
class SessionPayload : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
Int64 | createIndex | Internal index value that represents when the entry was created. |
String | id | id. |
Int64 | lockDelay | The duration for the lock delay. This must be greater than 0 |
String | node | The name of the node. This must refer to a node that is already registered. |
String | name | A human-readable name for the session. |
List<String> | cheks | A list of associated health check IDs (commonly CheckID in API responses). |
String | behavior | Controls the behavior to take when a session is invalidated. Valid values are:
|
String | ttl | The number of seconds (between 10s and 86400s). |
# SessionPayload::createIndex
Internal index value that represents when the entry was created.
DTO_FIELD(Int64, createIndex, "CreateIndex")
# SessionPayload::id
id.
DTO_FIELD(String, id, "ID")
# SessionPayload::lockDelay
The duration for the lock delay. This must be greater than 0
DTO_FIELD(Int64, lockDelay, "LockDelay")
# SessionPayload::node
The name of the node. This must refer to a node that is already registered.
DTO_FIELD(String, node, "Node")
# SessionPayload::name
A human-readable name for the session.
DTO_FIELD(String, name, "Name")
# SessionPayload::cheks
A list of associated health check IDs (commonly CheckID in API responses).
DTO_FIELD(List<String>, cheks, "Checks")
# SessionPayload::behavior
Controls the behavior to take when a session is invalidated. Valid values are:
- release - causes any locks that are held to be released
- delete - causes any locks that are held to be deleted
DTO_FIELD(String, behavior, "Behavior")
# SessionPayload::ttl
The number of seconds (between 10s and 86400s).
DTO_FIELD(String, ttl, "TTL")
# ServiceAddressPayload
The structure representing LAN and WAN addresses for the service instance.
namespace oatpp { namespace consul { namespace rest {
class ServiceAddressPayload : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | address | IP address. |
Int32 | port | Port. |
# ServiceAddressPayload::address
IP address.
DTO_FIELD(String, address, "Address")
# ServiceAddressPayload::port
Port.
DTO_FIELD(Int32, port, "Port")
# CatalogServicePayload
DTO Object representing Consul Catalog Service.
For more information see Consul Catalog HTTP API.
namespace oatpp { namespace consul { namespace rest {
class CatalogServicePayload : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | id | ID. |
String | node | The name of the Consul node on which the service is registered. |
String | address | The IP address of the Consul node on which the service is registered. |
String | datacenter | The data center of the Consul node on which the service is registered. |
Fields<String> | taggedAddresses | The list of explicit LAN and WAN IP addresses for the agent. |
Fields<String> | nodeMeta | The list of user-defined metadata key/value pairs for the node. |
String | serviceId | The unique service instance identifier |
String | serviceName | The name of the service |
String | serviceAddress | The IP address of the service host — if empty, node address should be used |
Fields<Object<ServiceAddressPayload>> | serviceTaggedAddresses | The map of explicit LAN and WAN addresses for the service instance. ServiceAddressPayload. |
List<String> | serviceTags | The list of tags for the service. |
Fields<String> | serviceMeta | The list of user-defined metadata key/value pairs for the service. |
Int32 | servicePort | The the port number of the service. |
Object<WeightsPayload> | serviceWeights | ServiceWeights. |
Boolean | serviceEnableTagOverride | Indicates whether service tags can be overridden on this service. |
Int64 | createIndex | Internal index value that represents when the entry was created. |
# CatalogServicePayload::id
ID.
DTO_FIELD(String, id, "ID")
# CatalogServicePayload::node
The name of the Consul node on which the service is registered.
DTO_FIELD(String, node, "Node")
# CatalogServicePayload::address
The IP address of the Consul node on which the service is registered.
DTO_FIELD(String, address, "Address")
# CatalogServicePayload::datacenter
The data center of the Consul node on which the service is registered.
DTO_FIELD(String, datacenter, "Datacenter")
# CatalogServicePayload::taggedAddresses
The list of explicit LAN and WAN IP addresses for the agent.
DTO_FIELD(Fields<String>, taggedAddresses, "TaggedAddresses")
# CatalogServicePayload::nodeMeta
The list of user-defined metadata key/value pairs for the node.
DTO_FIELD(Fields<String>, nodeMeta, "NodeMeta")
# CatalogServicePayload::serviceId
The unique service instance identifier
DTO_FIELD(String, serviceId, "ServiceID")
# CatalogServicePayload::serviceName
The name of the service
DTO_FIELD(String, serviceName, "ServiceName")
# CatalogServicePayload::serviceAddress
The IP address of the service host — if empty, node address should be used
DTO_FIELD(String, serviceAddress, "ServiceAddress")
# CatalogServicePayload::serviceTaggedAddresses
The map of explicit LAN and WAN addresses for the service instance. ServiceAddressPayload.
DTO_FIELD(Fields<Object<ServiceAddressPayload>>, serviceTaggedAddresses, "ServiceTaggedAddresses")
# CatalogServicePayload::serviceTags
The list of tags for the service.
DTO_FIELD(List<String>, serviceTags, "ServiceTags")
# CatalogServicePayload::serviceMeta
The list of user-defined metadata key/value pairs for the service.
DTO_FIELD(Fields<String>, serviceMeta, "ServiceMeta")
# CatalogServicePayload::servicePort
The the port number of the service.
DTO_FIELD(Int32, servicePort, "ServicePort")
# CatalogServicePayload::serviceWeights
ServiceWeights.
DTO_FIELD(Object<WeightsPayload>, serviceWeights, "ServiceWeights")
# CatalogServicePayload::serviceEnableTagOverride
Indicates whether service tags can be overridden on this service.
DTO_FIELD(Boolean, serviceEnableTagOverride, "ServiceEnableTagOverride")
# CatalogServicePayload::createIndex
Internal index value that represents when the entry was created.
DTO_FIELD(Int64, createIndex, "CreateIndex")