Class: ApplicationInsights::Channel::Contracts::RemoteDependencyData

Inherits:
JsonSerializable
  • Object
show all
Defined in:
lib/application_insights/channel/contracts/remote_dependency_data.rb

Overview

Data contract class for type RemoteDependencyData.

Instance Method Summary collapse

Methods inherited from JsonSerializable

#to_h, #to_json

Constructor Details

#initialize(options = {}) ⇒ RemoteDependencyData

Initializes a new instance of the RemoteDependencyData class.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 12

def initialize(options={})
  defaults = {
    'ver' => 2,
    'name' => nil,
    'kind' => DataPointType::MEASUREMENT,
    'value' => nil,
    'count' => nil,
    'min' => nil,
    'max' => nil,
    'stdDev' => nil,
    'dependencyKind' => DependencyKind::UNDEFINED,
    'success' => true,
    'async' => nil,
    'dependencySource' => DependencySourceType::UNDEFINED,
    'properties' => {}
  }
  values = {
    'ver' => 2,
    'name' => nil,
    'kind' => DataPointType::MEASUREMENT,
    'value' => nil,
    'dependencyKind' => DependencyKind::UNDEFINED,
    'success' => true,
    'dependencySource' => DependencySourceType::UNDEFINED
  }
  super defaults, values, options
end

Instance Method Details

#asyncObject

Gets the async property.



177
178
179
180
181
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 177

def async
  @values.fetch('async') { 
    @values['async'] = nil
  }
end

#async=(value) ⇒ Object

Sets the async property.



184
185
186
187
188
189
190
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 184

def async=(value)
  if value == @defaults['async']
    @values.delete 'async' if @values.key? 'async'
  else
    @values['async'] = value
  end
end

#countObject

Gets the count property.



87
88
89
90
91
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 87

def count
  @values.fetch('count') { 
    @values['count'] = nil
  }
end

#count=(value) ⇒ Object

Sets the count property.



94
95
96
97
98
99
100
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 94

def count=(value)
  if value == @defaults['count']
    @values.delete 'count' if @values.key? 'count'
  else
    @values['count'] = value
  end
end

#dependency_kindObject

Gets the dependency_kind property.



151
152
153
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 151

def dependency_kind
  @values['dependencyKind']
end

#dependency_kind=(value) ⇒ Object

Sets the dependency_kind property.



156
157
158
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 156

def dependency_kind=(value)
  @values['dependencyKind'] = value
end

#dependency_sourceObject

Gets the dependency_source property.



193
194
195
196
197
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 193

def dependency_source
  @values.fetch('dependencySource') { 
    @values['dependencySource'] = DependencySourceType::UNDEFINED
  }
end

#dependency_source=(value) ⇒ Object

Sets the dependency_source property.



200
201
202
203
204
205
206
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 200

def dependency_source=(value)
  if value == @defaults['dependencySource']
    @values.delete 'dependencySource' if @values.key? 'dependencySource'
  else
    @values['dependencySource'] = value
  end
end

#kindObject

Gets the kind property.



61
62
63
64
65
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 61

def kind
  @values.fetch('kind') { 
    @values['kind'] = DataPointType::MEASUREMENT
  }
end

#kind=(value) ⇒ Object

Sets the kind property.



68
69
70
71
72
73
74
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 68

def kind=(value)
  if value == @defaults['kind']
    @values.delete 'kind' if @values.key? 'kind'
  else
    @values['kind'] = value
  end
end

#maxObject

Gets the max property.



119
120
121
122
123
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 119

def max
  @values.fetch('max') { 
    @values['max'] = nil
  }
end

#max=(value) ⇒ Object

Sets the max property.



126
127
128
129
130
131
132
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 126

def max=(value)
  if value == @defaults['max']
    @values.delete 'max' if @values.key? 'max'
  else
    @values['max'] = value
  end
end

#minObject

Gets the min property.



103
104
105
106
107
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 103

def min
  @values.fetch('min') { 
    @values['min'] = nil
  }
end

#min=(value) ⇒ Object

Sets the min property.



110
111
112
113
114
115
116
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 110

def min=(value)
  if value == @defaults['min']
    @values.delete 'min' if @values.key? 'min'
  else
    @values['min'] = value
  end
end

#nameObject

Gets the name property.



51
52
53
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 51

def name
  @values['name']
end

#name=(value) ⇒ Object

Sets the name property.



56
57
58
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 56

def name=(value)
  @values['name'] = value
end

#propertiesObject

Gets the properties property.



209
210
211
212
213
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 209

def properties
  @values.fetch('properties') { 
    @values['properties'] = {}
  }
end

#properties=(value) ⇒ Object

Sets the properties property.



216
217
218
219
220
221
222
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 216

def properties=(value)
  if value == @defaults['properties']
    @values.delete 'properties' if @values.key? 'properties'
  else
    @values['properties'] = value
  end
end

#std_devObject

Gets the std_dev property.



135
136
137
138
139
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 135

def std_dev
  @values.fetch('stdDev') { 
    @values['stdDev'] = nil
  }
end

#std_dev=(value) ⇒ Object

Sets the std_dev property.



142
143
144
145
146
147
148
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 142

def std_dev=(value)
  if value == @defaults['stdDev']
    @values.delete 'stdDev' if @values.key? 'stdDev'
  else
    @values['stdDev'] = value
  end
end

#successObject

Gets the success property.



161
162
163
164
165
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 161

def success
  @values.fetch('success') { 
    @values['success'] = true
  }
end

#success=(value) ⇒ Object

Sets the success property.



168
169
170
171
172
173
174
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 168

def success=(value)
  if value == @defaults['success']
    @values.delete 'success' if @values.key? 'success'
  else
    @values['success'] = value
  end
end

#valueObject

Gets the value property.



77
78
79
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 77

def value
  @values['value']
end

#value=(value) ⇒ Object

Sets the value property.



82
83
84
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 82

def value=(value)
  @values['value'] = value
end

#verObject

Gets the ver property.



41
42
43
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 41

def ver
  @values['ver']
end

#ver=(value) ⇒ Object

Sets the ver property.



46
47
48
# File 'lib/application_insights/channel/contracts/remote_dependency_data.rb', line 46

def ver=(value)
  @values['ver'] = value
end