Class: ApplicationInsights::Channel::Contracts::Data
- Inherits:
-
JsonSerializable
- Object
- JsonSerializable
- ApplicationInsights::Channel::Contracts::Data
- Defined in:
- lib/application_insights/channel/contracts/data.rb
Overview
Data contract class for type Data.
Instance Method Summary collapse
-
#base_data ⇒ Object
Gets the base_data property.
-
#base_data=(value) ⇒ Object
Sets the base_data property.
-
#base_type ⇒ Object
Gets the base_type property.
-
#base_type=(value) ⇒ Object
Sets the base_type property.
-
#initialize(options = {}) ⇒ Data
constructor
Initializes a new instance of the Data class.
Methods inherited from JsonSerializable
Constructor Details
#initialize(options = {}) ⇒ Data
Initializes a new instance of the Data class.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/application_insights/channel/contracts/data.rb', line 9 def initialize(={}) defaults = { 'baseType' => nil, 'baseData' => nil } values = { 'baseData' => nil } super defaults, values, end |
Instance Method Details
#base_data ⇒ Object
Gets the base_data property.
37 38 39 |
# File 'lib/application_insights/channel/contracts/data.rb', line 37 def base_data @values['baseData'] end |
#base_data=(value) ⇒ Object
Sets the base_data property.
42 43 44 |
# File 'lib/application_insights/channel/contracts/data.rb', line 42 def base_data=(value) @values['baseData'] = value end |
#base_type ⇒ Object
Gets the base_type property.
21 22 23 24 25 |
# File 'lib/application_insights/channel/contracts/data.rb', line 21 def base_type @values.fetch('baseType') { @values['baseType'] = nil } end |
#base_type=(value) ⇒ Object
Sets the base_type property.
28 29 30 31 32 33 34 |
# File 'lib/application_insights/channel/contracts/data.rb', line 28 def base_type=(value) if value == @defaults['baseType'] @values.delete 'baseType' if @values.key? 'baseType' else @values['baseType'] = value end end |