Class: Datadog::Core::Telemetry::V1::TelemetryRequest
- Inherits:
-
Object
- Object
- Datadog::Core::Telemetry::V1::TelemetryRequest
- Defined in:
- lib/datadog/core/telemetry/v1/telemetry_request.rb
Overview
Describes attributes for telemetry API request
Constant Summary collapse
- ERROR_NIL_API_VERSION_MESSAGE =
':api_version must not be nil'.freeze
- ERROR_NIL_APPLICATION_MESSAGE =
':application must not be nil'.freeze
- ERROR_NIL_HOST_MESSAGE =
':host must not be nil'.freeze
- ERROR_NIL_PAYLOAD_MESSAGE =
':payload must not be nil'.freeze
- ERROR_NIL_REQUEST_TYPE_MESSAGE =
':request_type must not be nil'.freeze
- ERROR_NIL_RUNTIME_ID_MESSAGE =
':runtime_id must not be nil'.freeze
- ERROR_NIL_SEQ_ID_MESSAGE =
':seq_id must not be nil'.freeze
- ERROR_NIL_TRACER_TIME_MESSAGE =
':tracer_time must not be nil'.freeze
Instance Attribute Summary collapse
-
#api_version ⇒ Object
readonly
Returns the value of attribute api_version.
-
#application ⇒ Object
readonly
Returns the value of attribute application.
-
#debug ⇒ Object
readonly
Returns the value of attribute debug.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#request_type ⇒ Object
readonly
Returns the value of attribute request_type.
-
#runtime_id ⇒ Object
readonly
Returns the value of attribute runtime_id.
-
#seq_id ⇒ Object
readonly
Returns the value of attribute seq_id.
-
#session_id ⇒ Object
readonly
Returns the value of attribute session_id.
-
#tracer_time ⇒ Object
readonly
Returns the value of attribute tracer_time.
Instance Method Summary collapse
-
#initialize(api_version:, application:, host:, payload:, request_type:, runtime_id:, seq_id:, tracer_time:, debug: nil, session_id: nil) ⇒ TelemetryRequest
constructor
A new instance of TelemetryRequest.
- #to_h ⇒ Object
Constructor Details
#initialize(api_version:, application:, host:, payload:, request_type:, runtime_id:, seq_id:, tracer_time:, debug: nil, session_id: nil) ⇒ TelemetryRequest
Returns a new instance of TelemetryRequest.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 40 def initialize( api_version:, application:, host:, payload:, request_type:, runtime_id:, seq_id:, tracer_time:, debug: nil, session_id: nil ) validate( api_version: api_version, application: application, host: host, payload: payload, request_type: request_type, runtime_id: runtime_id, seq_id: seq_id, tracer_time: tracer_time ) @api_version = api_version @application = application @debug = debug @host = host @payload = payload @request_type = request_type @runtime_id = runtime_id @seq_id = seq_id @session_id = session_id @tracer_time = tracer_time end |
Instance Attribute Details
#api_version ⇒ Object (readonly)
Returns the value of attribute api_version.
16 17 18 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 16 def api_version @api_version end |
#application ⇒ Object (readonly)
Returns the value of attribute application.
16 17 18 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 16 def application @application end |
#debug ⇒ Object (readonly)
Returns the value of attribute debug.
16 17 18 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 16 def debug @debug end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
16 17 18 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 16 def host @host end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
16 17 18 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 16 def payload @payload end |
#request_type ⇒ Object (readonly)
Returns the value of attribute request_type.
16 17 18 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 16 def request_type @request_type end |
#runtime_id ⇒ Object (readonly)
Returns the value of attribute runtime_id.
16 17 18 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 16 def runtime_id @runtime_id end |
#seq_id ⇒ Object (readonly)
Returns the value of attribute seq_id.
16 17 18 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 16 def seq_id @seq_id end |
#session_id ⇒ Object (readonly)
Returns the value of attribute session_id.
16 17 18 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 16 def session_id @session_id end |
#tracer_time ⇒ Object (readonly)
Returns the value of attribute tracer_time.
16 17 18 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 16 def tracer_time @tracer_time end |
Instance Method Details
#to_h ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/datadog/core/telemetry/v1/telemetry_request.rb', line 66 def to_h { api_version: @api_version, application: @application.to_h, debug: @debug, host: @host.to_h, payload: @payload.to_h, request_type: @request_type, runtime_id: @runtime_id, seq_id: @seq_id, session_id: @session_id, tracer_time: @tracer_time } end |