Class: ApplicationInsights::Channel::Contracts::Operation
- Inherits:
-
JsonSerializable
- Object
- JsonSerializable
- ApplicationInsights::Channel::Contracts::Operation
- Defined in:
- lib/application_insights/channel/contracts/operation.rb
Overview
Data contract class for type Operation.
Instance Method Summary collapse
-
#id ⇒ Object
Gets the id property.
-
#id=(value) ⇒ Object
Sets the id property.
-
#initialize(options = {}) ⇒ Operation
constructor
Initializes a new instance of the Operation class.
-
#name ⇒ Object
Gets the name property.
-
#name=(value) ⇒ Object
Sets the name property.
-
#parent_id ⇒ Object
Gets the parent_id property.
-
#parent_id=(value) ⇒ Object
Sets the parent_id property.
-
#root_id ⇒ Object
Gets the root_id property.
-
#root_id=(value) ⇒ Object
Sets the root_id property.
Methods inherited from JsonSerializable
Constructor Details
#initialize(options = {}) ⇒ Operation
Initializes a new instance of the Operation class.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 9 def initialize(={}) defaults = { 'ai.operation.id' => nil, 'ai.operation.name' => nil, 'ai.operation.parentId' => nil, 'ai.operation.rootId' => nil } values = { } super defaults, values, end |
Instance Method Details
#id ⇒ Object
Gets the id property.
22 23 24 25 26 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 22 def id @values.fetch('ai.operation.id') { @values['ai.operation.id'] = nil } end |
#id=(value) ⇒ Object
Sets the id property.
29 30 31 32 33 34 35 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 29 def id=(value) if value == @defaults['ai.operation.id'] @values.delete 'ai.operation.id' if @values.key? 'ai.operation.id' else @values['ai.operation.id'] = value end end |
#name ⇒ Object
Gets the name property.
38 39 40 41 42 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 38 def name @values.fetch('ai.operation.name') { @values['ai.operation.name'] = nil } end |
#name=(value) ⇒ Object
Sets the name property.
45 46 47 48 49 50 51 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 45 def name=(value) if value == @defaults['ai.operation.name'] @values.delete 'ai.operation.name' if @values.key? 'ai.operation.name' else @values['ai.operation.name'] = value end end |
#parent_id ⇒ Object
Gets the parent_id property.
54 55 56 57 58 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 54 def parent_id @values.fetch('ai.operation.parentId') { @values['ai.operation.parentId'] = nil } end |
#parent_id=(value) ⇒ Object
Sets the parent_id property.
61 62 63 64 65 66 67 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 61 def parent_id=(value) if value == @defaults['ai.operation.parentId'] @values.delete 'ai.operation.parentId' if @values.key? 'ai.operation.parentId' else @values['ai.operation.parentId'] = value end end |
#root_id ⇒ Object
Gets the root_id property.
70 71 72 73 74 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 70 def root_id @values.fetch('ai.operation.rootId') { @values['ai.operation.rootId'] = nil } end |
#root_id=(value) ⇒ Object
Sets the root_id property.
77 78 79 80 81 82 83 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 77 def root_id=(value) if value == @defaults['ai.operation.rootId'] @values.delete 'ai.operation.rootId' if @values.key? 'ai.operation.rootId' else @values['ai.operation.rootId'] = value end end |