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.
-
#is_synthetic ⇒ Object
Gets the is_synthetic property.
-
#is_synthetic=(value) ⇒ Object
Sets the is_synthetic property.
-
#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.
-
#synthetic_source ⇒ Object
Gets the synthetic_source property.
-
#synthetic_source=(value) ⇒ Object
Sets the synthetic_source 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 20 21 |
# 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, 'ai.operation.syntheticSource' => nil, 'ai.operation.isSynthetic' => nil } values = { } super defaults, values, end |
Instance Method Details
#id ⇒ Object
Gets the id property.
24 25 26 27 28 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 24 def id @values.fetch('ai.operation.id') { @values['ai.operation.id'] = nil } end |
#id=(value) ⇒ Object
Sets the id property.
31 32 33 34 35 36 37 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 31 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 |
#is_synthetic ⇒ Object
Gets the is_synthetic property.
104 105 106 107 108 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 104 def is_synthetic @values.fetch('ai.operation.isSynthetic') { @values['ai.operation.isSynthetic'] = nil } end |
#is_synthetic=(value) ⇒ Object
Sets the is_synthetic property.
111 112 113 114 115 116 117 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 111 def is_synthetic=(value) if value == @defaults['ai.operation.isSynthetic'] @values.delete 'ai.operation.isSynthetic' if @values.key? 'ai.operation.isSynthetic' else @values['ai.operation.isSynthetic'] = value end end |
#name ⇒ Object
Gets the name property.
40 41 42 43 44 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 40 def name @values.fetch('ai.operation.name') { @values['ai.operation.name'] = nil } end |
#name=(value) ⇒ Object
Sets the name property.
47 48 49 50 51 52 53 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 47 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.
56 57 58 59 60 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 56 def parent_id @values.fetch('ai.operation.parentId') { @values['ai.operation.parentId'] = nil } end |
#parent_id=(value) ⇒ Object
Sets the parent_id property.
63 64 65 66 67 68 69 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 63 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.
72 73 74 75 76 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 72 def root_id @values.fetch('ai.operation.rootId') { @values['ai.operation.rootId'] = nil } end |
#root_id=(value) ⇒ Object
Sets the root_id property.
79 80 81 82 83 84 85 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 79 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 |
#synthetic_source ⇒ Object
Gets the synthetic_source property.
88 89 90 91 92 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 88 def synthetic_source @values.fetch('ai.operation.syntheticSource') { @values['ai.operation.syntheticSource'] = nil } end |
#synthetic_source=(value) ⇒ Object
Sets the synthetic_source property.
95 96 97 98 99 100 101 |
# File 'lib/application_insights/channel/contracts/operation.rb', line 95 def synthetic_source=(value) if value == @defaults['ai.operation.syntheticSource'] @values.delete 'ai.operation.syntheticSource' if @values.key? 'ai.operation.syntheticSource' else @values['ai.operation.syntheticSource'] = value end end |