test-pack-1 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -768
  3. data/lib/test_pack_1.rb +2 -30
  4. data/lib/test_pack_1/configuration.rb +5 -17
  5. data/lib/test_pack_1/controllers/simple_calculator_controller.rb +53 -0
  6. data/lib/test_pack_1/models/operation_type_enum.rb +23 -0
  7. data/lib/test_pack_1/test_pack1_client.rb +4 -34
  8. data/test/controllers/test_simple_calculator_controller.rb +33 -0
  9. metadata +6 -64
  10. data/lib/test_pack_1/controllers/alerts_controller.rb +0 -381
  11. data/lib/test_pack_1/controllers/assets_controller.rb +0 -227
  12. data/lib/test_pack_1/controllers/configuration_data_controller.rb +0 -76
  13. data/lib/test_pack_1/controllers/data_controller.rb +0 -349
  14. data/lib/test_pack_1/controllers/statuses_controller.rb +0 -215
  15. data/lib/test_pack_1/http/auth/custom_query_auth.rb +0 -16
  16. data/lib/test_pack_1/models/aggregate_mode_enum.rb +0 -23
  17. data/lib/test_pack_1/models/alert_item.rb +0 -104
  18. data/lib/test_pack_1/models/calculation_mode_enum.rb +0 -20
  19. data/lib/test_pack_1/models/client_configuration.rb +0 -62
  20. data/lib/test_pack_1/models/configuration_item.rb +0 -55
  21. data/lib/test_pack_1/models/data_item.rb +0 -92
  22. data/lib/test_pack_1/models/data_per_category_item.rb +0 -82
  23. data/lib/test_pack_1/models/data_per_category_response.rb +0 -63
  24. data/lib/test_pack_1/models/data_real_time_item.rb +0 -83
  25. data/lib/test_pack_1/models/data_signal.rb +0 -53
  26. data/lib/test_pack_1/models/data_signal_configuration.rb +0 -66
  27. data/lib/test_pack_1/models/data_signal_item.rb +0 -62
  28. data/lib/test_pack_1/models/device.rb +0 -208
  29. data/lib/test_pack_1/models/device_model.rb +0 -53
  30. data/lib/test_pack_1/models/metadata_field.rb +0 -44
  31. data/lib/test_pack_1/models/power_curve.rb +0 -60
  32. data/lib/test_pack_1/models/power_curve_value.rb +0 -44
  33. data/lib/test_pack_1/models/resolution_enum.rb +0 -41
  34. data/lib/test_pack_1/models/site.rb +0 -44
  35. data/lib/test_pack_1/models/site_with_data.rb +0 -78
  36. data/lib/test_pack_1/models/status_category_enum.rb +0 -26
  37. data/lib/test_pack_1/models/status_item.rb +0 -161
  38. data/lib/test_pack_1/models/time_zone_configuration.rb +0 -76
  39. data/lib/test_pack_1/models/turbine_type.rb +0 -89
  40. data/test/controllers/test_assets_controller.rb +0 -46
  41. data/test/controllers/test_configuration_data_controller.rb +0 -44
@@ -1,208 +0,0 @@
1
- # test_pack_1
2
- #
3
- # This file was automatically generated by APIMATIC v2.0 (
4
- # https://apimatic.io ).
5
-
6
- require 'date'
7
- module TestPack1
8
- # Device Model.
9
- class Device < BaseModel
10
- # The id of a device.
11
- # @return [Integer]
12
- attr_accessor :device_id
13
-
14
- # The id of a device.
15
- # @return [String]
16
- attr_accessor :title
17
-
18
- # An alternative title.
19
- # @return [String]
20
- attr_accessor :alt_title
21
-
22
- # Device identification number.
23
- # @return [String]
24
- attr_accessor :identity
25
-
26
- # Device identification number.
27
- # @return [Site]
28
- attr_accessor :site
29
-
30
- # The string representation of the device type.
31
- # @return [String]
32
- attr_accessor :device_type
33
-
34
- # The id of a device type.
35
- # @return [Integer]
36
- attr_accessor :device_type_id
37
-
38
- # The id of the parent device, if any.
39
- # @return [Integer]
40
- attr_accessor :parent_id
41
-
42
- # Ids of child devices, if any.
43
- # @return [List of Integer]
44
- attr_accessor :child_ids
45
-
46
- # General device model information.
47
- # @return [DeviceModel]
48
- attr_accessor :device_model
49
-
50
- # Turbine-specific type information.
51
- # @return [TurbineType]
52
- attr_accessor :turbine_type
53
-
54
- # The maximum power for a device.
55
- # @return [Integer]
56
- attr_accessor :max_power
57
-
58
- # Only applies to Nordic countries and the UK.
59
- # @return [String]
60
- attr_accessor :bidding_area
61
-
62
- # The earliest timestamp device data is available for.
63
- # @return [DateTime]
64
- attr_accessor :timestamp_start
65
-
66
- # The latitude of the device in the WGS84 system.
67
- # @return [String]
68
- attr_accessor :latitude
69
-
70
- # The longitude of the device in the WGS84 system.
71
- # @return [String]
72
- attr_accessor :longitude
73
-
74
- # The elevation of the device in meters above sea level.
75
- # @return [String]
76
- attr_accessor :elevation
77
-
78
- # The target availability for the device.
79
- # @return [Float]
80
- attr_accessor :target_availability
81
-
82
- # A list of metadata fields and their values.
83
- # @return [List of MetadataField]
84
- attr_accessor :metadata
85
-
86
- # A mapping from model property names to API property names.
87
- def self.names
88
- @_hash = {} if @_hash.nil?
89
- @_hash['device_id'] = 'deviceId'
90
- @_hash['title'] = 'title'
91
- @_hash['alt_title'] = 'altTitle'
92
- @_hash['identity'] = 'identity'
93
- @_hash['site'] = 'site'
94
- @_hash['device_type'] = 'deviceType'
95
- @_hash['device_type_id'] = 'deviceTypeId'
96
- @_hash['parent_id'] = 'parentId'
97
- @_hash['child_ids'] = 'childIds'
98
- @_hash['device_model'] = 'deviceModel'
99
- @_hash['turbine_type'] = 'turbineType'
100
- @_hash['max_power'] = 'maxPower'
101
- @_hash['bidding_area'] = 'biddingArea'
102
- @_hash['timestamp_start'] = 'timestampStart'
103
- @_hash['latitude'] = 'latitude'
104
- @_hash['longitude'] = 'longitude'
105
- @_hash['elevation'] = 'elevation'
106
- @_hash['target_availability'] = 'targetAvailability'
107
- @_hash['metadata'] = 'metadata'
108
- @_hash
109
- end
110
-
111
- def initialize(device_id = nil,
112
- title = nil,
113
- alt_title = nil,
114
- identity = nil,
115
- site = nil,
116
- device_type = nil,
117
- device_type_id = nil,
118
- parent_id = nil,
119
- child_ids = nil,
120
- device_model = nil,
121
- turbine_type = nil,
122
- max_power = nil,
123
- bidding_area = nil,
124
- timestamp_start = nil,
125
- latitude = nil,
126
- longitude = nil,
127
- elevation = nil,
128
- target_availability = nil,
129
- metadata = nil)
130
- @device_id = device_id
131
- @title = title
132
- @alt_title = alt_title
133
- @identity = identity
134
- @site = site
135
- @device_type = device_type
136
- @device_type_id = device_type_id
137
- @parent_id = parent_id
138
- @child_ids = child_ids
139
- @device_model = device_model
140
- @turbine_type = turbine_type
141
- @max_power = max_power
142
- @bidding_area = bidding_area
143
- @timestamp_start = timestamp_start
144
- @latitude = latitude
145
- @longitude = longitude
146
- @elevation = elevation
147
- @target_availability = target_availability
148
- @metadata = metadata
149
- end
150
-
151
- # Creates an instance of the object from a hash.
152
- def self.from_hash(hash)
153
- return nil unless hash
154
-
155
- # Extract variables from the hash.
156
- device_id = hash['deviceId']
157
- title = hash['title']
158
- alt_title = hash['altTitle']
159
- identity = hash['identity']
160
- site = Site.from_hash(hash['site']) if hash['site']
161
- device_type = hash['deviceType']
162
- device_type_id = hash['deviceTypeId']
163
- parent_id = hash['parentId']
164
- child_ids = hash['childIds']
165
- device_model = DeviceModel.from_hash(hash['deviceModel']) if
166
- hash['deviceModel']
167
- turbine_type = TurbineType.from_hash(hash['turbineType']) if
168
- hash['turbineType']
169
- max_power = hash['maxPower']
170
- bidding_area = hash['biddingArea']
171
- timestamp_start = APIHelper.rfc3339(hash['timestampStart']) if
172
- hash['timestampStart']
173
- latitude = hash['latitude']
174
- longitude = hash['longitude']
175
- elevation = hash['elevation']
176
- target_availability = hash['targetAvailability']
177
- # Parameter is an array, so we need to iterate through it
178
- metadata = nil
179
- unless hash['metadata'].nil?
180
- metadata = []
181
- hash['metadata'].each do |structure|
182
- metadata << (MetadataField.from_hash(structure) if structure)
183
- end
184
- end
185
-
186
- # Create object from extracted values.
187
- Device.new(device_id,
188
- title,
189
- alt_title,
190
- identity,
191
- site,
192
- device_type,
193
- device_type_id,
194
- parent_id,
195
- child_ids,
196
- device_model,
197
- turbine_type,
198
- max_power,
199
- bidding_area,
200
- timestamp_start,
201
- latitude,
202
- longitude,
203
- elevation,
204
- target_availability,
205
- metadata)
206
- end
207
- end
208
- end
@@ -1,53 +0,0 @@
1
- # test_pack_1
2
- #
3
- # This file was automatically generated by APIMATIC v2.0 (
4
- # https://apimatic.io ).
5
-
6
- module TestPack1
7
- # General device model information.
8
- class DeviceModel < BaseModel
9
- # TODO: Write general description for this method
10
- # @return [Integer]
11
- attr_accessor :device_model_id
12
-
13
- # TODO: Write general description for this method
14
- # @return [String]
15
- attr_accessor :manufacturer
16
-
17
- # TODO: Write general description for this method
18
- # @return [String]
19
- attr_accessor :model
20
-
21
- # A mapping from model property names to API property names.
22
- def self.names
23
- @_hash = {} if @_hash.nil?
24
- @_hash['device_model_id'] = 'deviceModelId'
25
- @_hash['manufacturer'] = 'manufacturer'
26
- @_hash['model'] = 'model'
27
- @_hash
28
- end
29
-
30
- def initialize(device_model_id = nil,
31
- manufacturer = nil,
32
- model = nil)
33
- @device_model_id = device_model_id
34
- @manufacturer = manufacturer
35
- @model = model
36
- end
37
-
38
- # Creates an instance of the object from a hash.
39
- def self.from_hash(hash)
40
- return nil unless hash
41
-
42
- # Extract variables from the hash.
43
- device_model_id = hash['deviceModelId']
44
- manufacturer = hash['manufacturer']
45
- model = hash['model']
46
-
47
- # Create object from extracted values.
48
- DeviceModel.new(device_model_id,
49
- manufacturer,
50
- model)
51
- end
52
- end
53
- end
@@ -1,44 +0,0 @@
1
- # test_pack_1
2
- #
3
- # This file was automatically generated by APIMATIC v2.0 (
4
- # https://apimatic.io ).
5
-
6
- module TestPack1
7
- # A metadata field.
8
- class MetadataField < BaseModel
9
- # TODO: Write general description for this method
10
- # @return [String]
11
- attr_accessor :key
12
-
13
- # TODO: Write general description for this method
14
- # @return [String]
15
- attr_accessor :value
16
-
17
- # A mapping from model property names to API property names.
18
- def self.names
19
- @_hash = {} if @_hash.nil?
20
- @_hash['key'] = 'key'
21
- @_hash['value'] = 'value'
22
- @_hash
23
- end
24
-
25
- def initialize(key = nil,
26
- value = nil)
27
- @key = key
28
- @value = value
29
- end
30
-
31
- # Creates an instance of the object from a hash.
32
- def self.from_hash(hash)
33
- return nil unless hash
34
-
35
- # Extract variables from the hash.
36
- key = hash['key']
37
- value = hash['value']
38
-
39
- # Create object from extracted values.
40
- MetadataField.new(key,
41
- value)
42
- end
43
- end
44
- end
@@ -1,60 +0,0 @@
1
- # test_pack_1
2
- #
3
- # This file was automatically generated by APIMATIC v2.0 (
4
- # https://apimatic.io ).
5
-
6
- module TestPack1
7
- # PowerCurve Model.
8
- class PowerCurve < BaseModel
9
- # The id of a device.
10
- # @return [Integer]
11
- attr_accessor :device_id
12
-
13
- # The title of the power curve.
14
- # @return [String]
15
- attr_accessor :title
16
-
17
- # The title of the power curve.
18
- # @return [List of PowerCurveValue]
19
- attr_accessor :values
20
-
21
- # A mapping from model property names to API property names.
22
- def self.names
23
- @_hash = {} if @_hash.nil?
24
- @_hash['device_id'] = 'deviceId'
25
- @_hash['title'] = 'title'
26
- @_hash['values'] = 'values'
27
- @_hash
28
- end
29
-
30
- def initialize(device_id = nil,
31
- title = nil,
32
- values = nil)
33
- @device_id = device_id
34
- @title = title
35
- @values = values
36
- end
37
-
38
- # Creates an instance of the object from a hash.
39
- def self.from_hash(hash)
40
- return nil unless hash
41
-
42
- # Extract variables from the hash.
43
- device_id = hash['deviceId']
44
- title = hash['title']
45
- # Parameter is an array, so we need to iterate through it
46
- values = nil
47
- unless hash['values'].nil?
48
- values = []
49
- hash['values'].each do |structure|
50
- values << (PowerCurveValue.from_hash(structure) if structure)
51
- end
52
- end
53
-
54
- # Create object from extracted values.
55
- PowerCurve.new(device_id,
56
- title,
57
- values)
58
- end
59
- end
60
- end
@@ -1,44 +0,0 @@
1
- # test_pack_1
2
- #
3
- # This file was automatically generated by APIMATIC v2.0 (
4
- # https://apimatic.io ).
5
-
6
- module TestPack1
7
- # The power at a specific wind speed according to a power curve.
8
- class PowerCurveValue < BaseModel
9
- # Wind speed in m/s
10
- # @return [Float]
11
- attr_accessor :wind_speed
12
-
13
- # Power in kW
14
- # @return [Float]
15
- attr_accessor :power
16
-
17
- # A mapping from model property names to API property names.
18
- def self.names
19
- @_hash = {} if @_hash.nil?
20
- @_hash['wind_speed'] = 'windSpeed'
21
- @_hash['power'] = 'power'
22
- @_hash
23
- end
24
-
25
- def initialize(wind_speed = nil,
26
- power = nil)
27
- @wind_speed = wind_speed
28
- @power = power
29
- end
30
-
31
- # Creates an instance of the object from a hash.
32
- def self.from_hash(hash)
33
- return nil unless hash
34
-
35
- # Extract variables from the hash.
36
- wind_speed = hash['windSpeed']
37
- power = hash['power']
38
-
39
- # Create object from extracted values.
40
- PowerCurveValue.new(wind_speed,
41
- power)
42
- end
43
- end
44
- end
@@ -1,41 +0,0 @@
1
- # test_pack_1
2
- #
3
- # This file was automatically generated by APIMATIC v2.0 (
4
- # https://apimatic.io ).
5
-
6
- module TestPack1
7
- # The resolution for time-series data.
8
- class ResolutionEnum
9
- RESOLUTION_ENUM = [
10
- # TODO: Write general description for ENUM_5MINUTE
11
- ENUM_5MINUTE = '5minute'.freeze,
12
-
13
- # TODO: Write general description for ENUM_10MINUTE
14
- ENUM_10MINUTE = '10minute'.freeze,
15
-
16
- # TODO: Write general description for ENUM_15MINUTE
17
- ENUM_15MINUTE = '15minute'.freeze,
18
-
19
- # TODO: Write general description for HOURLY
20
- HOURLY = 'hourly'.freeze,
21
-
22
- # TODO: Write general description for DAILY
23
- DAILY = 'daily'.freeze,
24
-
25
- # TODO: Write general description for WEEKLY
26
- WEEKLY = 'weekly'.freeze,
27
-
28
- # TODO: Write general description for MONTHLY
29
- MONTHLY = 'monthly'.freeze,
30
-
31
- # TODO: Write general description for YEARLY
32
- YEARLY = 'yearly'.freeze,
33
-
34
- # TODO: Write general description for INTERVAL
35
- INTERVAL = 'interval'.freeze,
36
-
37
- # TODO: Write general description for DEVICE
38
- DEVICE = 'device'.freeze
39
- ].freeze
40
- end
41
- end