Class: ApplicationInsights::Channel::Contracts::Internal
- Inherits:
-
JsonSerializable
- Object
- JsonSerializable
- ApplicationInsights::Channel::Contracts::Internal
- Defined in:
- lib/application_insights/channel/contracts/internal.rb
Overview
Data contract class for type Internal.
Instance Method Summary collapse
-
#agent_version ⇒ Object
Gets the agent_version property.
-
#agent_version=(value) ⇒ Object
Sets the agent_version property.
-
#initialize(options = {}) ⇒ Internal
constructor
Initializes a new instance of the Internal class.
-
#sdk_version ⇒ Object
Gets the sdk_version property.
-
#sdk_version=(value) ⇒ Object
Sets the sdk_version property.
Methods inherited from JsonSerializable
Constructor Details
#initialize(options = {}) ⇒ Internal
Initializes a new instance of the Internal class.
9 10 11 12 13 14 15 16 17 |
# File 'lib/application_insights/channel/contracts/internal.rb', line 9 def initialize(={}) defaults = { 'ai.internal.sdkVersion' => nil, 'ai.internal.agentVersion' => nil } values = { } super defaults, values, end |
Instance Method Details
#agent_version ⇒ Object
Gets the agent_version property.
36 37 38 39 40 |
# File 'lib/application_insights/channel/contracts/internal.rb', line 36 def agent_version @values.fetch('ai.internal.agentVersion') { @values['ai.internal.agentVersion'] = nil } end |
#agent_version=(value) ⇒ Object
Sets the agent_version property.
43 44 45 46 47 48 49 |
# File 'lib/application_insights/channel/contracts/internal.rb', line 43 def agent_version=(value) if value == @defaults['ai.internal.agentVersion'] @values.delete 'ai.internal.agentVersion' if @values.key? 'ai.internal.agentVersion' else @values['ai.internal.agentVersion'] = value end end |
#sdk_version ⇒ Object
Gets the sdk_version property.
20 21 22 23 24 |
# File 'lib/application_insights/channel/contracts/internal.rb', line 20 def sdk_version @values.fetch('ai.internal.sdkVersion') { @values['ai.internal.sdkVersion'] = nil } end |
#sdk_version=(value) ⇒ Object
Sets the sdk_version property.
27 28 29 30 31 32 33 |
# File 'lib/application_insights/channel/contracts/internal.rb', line 27 def sdk_version=(value) if value == @defaults['ai.internal.sdkVersion'] @values.delete 'ai.internal.sdkVersion' if @values.key? 'ai.internal.sdkVersion' else @values['ai.internal.sdkVersion'] = value end end |