daytona_analytics_api_client 0.197.0

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.
@@ -0,0 +1,221 @@
1
+ =begin
2
+ #Daytona Analytics API
3
+
4
+ #Daytona Analytics API - Read-only telemetry and usage data. Authenticated via Daytona API keys or JWT tokens.
5
+
6
+ The version of the OpenAPI document: v0.4.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaAnalyticsApiClient
17
+ class ModelsSpan < ApiModelBase
18
+ attr_accessor :duration_ms
19
+
20
+ attr_accessor :parent_span_id
21
+
22
+ attr_accessor :span_attributes
23
+
24
+ attr_accessor :span_id
25
+
26
+ attr_accessor :span_name
27
+
28
+ attr_accessor :status_code
29
+
30
+ attr_accessor :status_message
31
+
32
+ attr_accessor :timestamp
33
+
34
+ attr_accessor :trace_id
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'duration_ms' => :'durationMs',
40
+ :'parent_span_id' => :'parentSpanId',
41
+ :'span_attributes' => :'spanAttributes',
42
+ :'span_id' => :'spanId',
43
+ :'span_name' => :'spanName',
44
+ :'status_code' => :'statusCode',
45
+ :'status_message' => :'statusMessage',
46
+ :'timestamp' => :'timestamp',
47
+ :'trace_id' => :'traceId'
48
+ }
49
+ end
50
+
51
+ # Returns attribute mapping this model knows about
52
+ def self.acceptable_attribute_map
53
+ attribute_map
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ acceptable_attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'duration_ms' => :'Float',
65
+ :'parent_span_id' => :'String',
66
+ :'span_attributes' => :'Hash<String, String>',
67
+ :'span_id' => :'String',
68
+ :'span_name' => :'String',
69
+ :'status_code' => :'String',
70
+ :'status_message' => :'String',
71
+ :'timestamp' => :'String',
72
+ :'trace_id' => :'String'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ ])
80
+ end
81
+
82
+ # Initializes the object
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ def initialize(attributes = {})
85
+ if (!attributes.is_a?(Hash))
86
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaAnalyticsApiClient::ModelsSpan` initialize method"
87
+ end
88
+
89
+ # check to see if the attribute exists and convert string to symbol for hash key
90
+ acceptable_attribute_map = self.class.acceptable_attribute_map
91
+ attributes = attributes.each_with_object({}) { |(k, v), h|
92
+ if (!acceptable_attribute_map.key?(k.to_sym))
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaAnalyticsApiClient::ModelsSpan`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
+ end
95
+ h[k.to_sym] = v
96
+ }
97
+
98
+ if attributes.key?(:'duration_ms')
99
+ self.duration_ms = attributes[:'duration_ms']
100
+ end
101
+
102
+ if attributes.key?(:'parent_span_id')
103
+ self.parent_span_id = attributes[:'parent_span_id']
104
+ end
105
+
106
+ if attributes.key?(:'span_attributes')
107
+ if (value = attributes[:'span_attributes']).is_a?(Hash)
108
+ self.span_attributes = value
109
+ end
110
+ end
111
+
112
+ if attributes.key?(:'span_id')
113
+ self.span_id = attributes[:'span_id']
114
+ end
115
+
116
+ if attributes.key?(:'span_name')
117
+ self.span_name = attributes[:'span_name']
118
+ end
119
+
120
+ if attributes.key?(:'status_code')
121
+ self.status_code = attributes[:'status_code']
122
+ end
123
+
124
+ if attributes.key?(:'status_message')
125
+ self.status_message = attributes[:'status_message']
126
+ end
127
+
128
+ if attributes.key?(:'timestamp')
129
+ self.timestamp = attributes[:'timestamp']
130
+ end
131
+
132
+ if attributes.key?(:'trace_id')
133
+ self.trace_id = attributes[:'trace_id']
134
+ end
135
+ end
136
+
137
+ # Show invalid properties with the reasons. Usually used together with valid?
138
+ # @return Array for valid properties with the reasons
139
+ def list_invalid_properties
140
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
141
+ invalid_properties = Array.new
142
+ invalid_properties
143
+ end
144
+
145
+ # Check to see if the all the properties in the model are valid
146
+ # @return true if the model is valid
147
+ def valid?
148
+ warn '[DEPRECATED] the `valid?` method is obsolete'
149
+ true
150
+ end
151
+
152
+ # Checks equality by comparing each attribute.
153
+ # @param [Object] Object to be compared
154
+ def ==(o)
155
+ return true if self.equal?(o)
156
+ self.class == o.class &&
157
+ duration_ms == o.duration_ms &&
158
+ parent_span_id == o.parent_span_id &&
159
+ span_attributes == o.span_attributes &&
160
+ span_id == o.span_id &&
161
+ span_name == o.span_name &&
162
+ status_code == o.status_code &&
163
+ status_message == o.status_message &&
164
+ timestamp == o.timestamp &&
165
+ trace_id == o.trace_id
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(o)
171
+ self == o
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ def hash
177
+ [duration_ms, parent_span_id, span_attributes, span_id, span_name, status_code, status_message, timestamp, trace_id].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def self.build_from_hash(attributes)
184
+ return nil unless attributes.is_a?(Hash)
185
+ attributes = attributes.transform_keys(&:to_sym)
186
+ transformed_hash = {}
187
+ openapi_types.each_pair do |key, type|
188
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
189
+ transformed_hash["#{key}"] = nil
190
+ elsif type =~ /\AArray<(.*)>/i
191
+ # check to ensure the input is an array given that the attribute
192
+ # is documented as an array but the input is not
193
+ if attributes[attribute_map[key]].is_a?(Array)
194
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
195
+ end
196
+ elsif !attributes[attribute_map[key]].nil?
197
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
198
+ end
199
+ end
200
+ new(transformed_hash)
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ end
220
+
221
+ end
@@ -0,0 +1,201 @@
1
+ =begin
2
+ #Daytona Analytics API
3
+
4
+ #Daytona Analytics API - Read-only telemetry and usage data. Authenticated via Daytona API keys or JWT tokens.
5
+
6
+ The version of the OpenAPI document: v0.4.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaAnalyticsApiClient
17
+ class ModelsTraceSummary < ApiModelBase
18
+ attr_accessor :end_time
19
+
20
+ attr_accessor :root_span_name
21
+
22
+ attr_accessor :span_count
23
+
24
+ attr_accessor :start_time
25
+
26
+ attr_accessor :status_code
27
+
28
+ attr_accessor :total_duration_ms
29
+
30
+ attr_accessor :trace_id
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'end_time' => :'endTime',
36
+ :'root_span_name' => :'rootSpanName',
37
+ :'span_count' => :'spanCount',
38
+ :'start_time' => :'startTime',
39
+ :'status_code' => :'statusCode',
40
+ :'total_duration_ms' => :'totalDurationMs',
41
+ :'trace_id' => :'traceId'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'end_time' => :'String',
59
+ :'root_span_name' => :'String',
60
+ :'span_count' => :'Integer',
61
+ :'start_time' => :'String',
62
+ :'status_code' => :'String',
63
+ :'total_duration_ms' => :'Float',
64
+ :'trace_id' => :'String'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaAnalyticsApiClient::ModelsTraceSummary` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ acceptable_attribute_map = self.class.acceptable_attribute_map
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!acceptable_attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaAnalyticsApiClient::ModelsTraceSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'end_time')
91
+ self.end_time = attributes[:'end_time']
92
+ end
93
+
94
+ if attributes.key?(:'root_span_name')
95
+ self.root_span_name = attributes[:'root_span_name']
96
+ end
97
+
98
+ if attributes.key?(:'span_count')
99
+ self.span_count = attributes[:'span_count']
100
+ end
101
+
102
+ if attributes.key?(:'start_time')
103
+ self.start_time = attributes[:'start_time']
104
+ end
105
+
106
+ if attributes.key?(:'status_code')
107
+ self.status_code = attributes[:'status_code']
108
+ end
109
+
110
+ if attributes.key?(:'total_duration_ms')
111
+ self.total_duration_ms = attributes[:'total_duration_ms']
112
+ end
113
+
114
+ if attributes.key?(:'trace_id')
115
+ self.trace_id = attributes[:'trace_id']
116
+ end
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properties with the reasons
121
+ def list_invalid_properties
122
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
123
+ invalid_properties = Array.new
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ true
132
+ end
133
+
134
+ # Checks equality by comparing each attribute.
135
+ # @param [Object] Object to be compared
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ end_time == o.end_time &&
140
+ root_span_name == o.root_span_name &&
141
+ span_count == o.span_count &&
142
+ start_time == o.start_time &&
143
+ status_code == o.status_code &&
144
+ total_duration_ms == o.total_duration_ms &&
145
+ trace_id == o.trace_id
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [end_time, root_span_name, span_count, start_time, status_code, total_duration_ms, trace_id].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def self.build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ attributes = attributes.transform_keys(&:to_sym)
166
+ transformed_hash = {}
167
+ openapi_types.each_pair do |key, type|
168
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = nil
170
+ elsif type =~ /\AArray<(.*)>/i
171
+ # check to ensure the input is an array given that the attribute
172
+ # is documented as an array but the input is not
173
+ if attributes[attribute_map[key]].is_a?(Array)
174
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
175
+ end
176
+ elsif !attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
178
+ end
179
+ end
180
+ new(transformed_hash)
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ end
200
+
201
+ end
@@ -0,0 +1,201 @@
1
+ =begin
2
+ #Daytona Analytics API
3
+
4
+ #Daytona Analytics API - Read-only telemetry and usage data. Authenticated via Daytona API keys or JWT tokens.
5
+
6
+ The version of the OpenAPI document: v0.4.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaAnalyticsApiClient
17
+ class ModelsUsageChartPoint < ApiModelBase
18
+ attr_accessor :cpu
19
+
20
+ attr_accessor :cpu_price
21
+
22
+ attr_accessor :disk_gb
23
+
24
+ attr_accessor :disk_price
25
+
26
+ attr_accessor :ram_gb
27
+
28
+ attr_accessor :ram_price
29
+
30
+ attr_accessor :time
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'cpu' => :'cpu',
36
+ :'cpu_price' => :'cpuPrice',
37
+ :'disk_gb' => :'diskGB',
38
+ :'disk_price' => :'diskPrice',
39
+ :'ram_gb' => :'ramGB',
40
+ :'ram_price' => :'ramPrice',
41
+ :'time' => :'time'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'cpu' => :'Integer',
59
+ :'cpu_price' => :'Float',
60
+ :'disk_gb' => :'Integer',
61
+ :'disk_price' => :'Float',
62
+ :'ram_gb' => :'Integer',
63
+ :'ram_price' => :'Float',
64
+ :'time' => :'String'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaAnalyticsApiClient::ModelsUsageChartPoint` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ acceptable_attribute_map = self.class.acceptable_attribute_map
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!acceptable_attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaAnalyticsApiClient::ModelsUsageChartPoint`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'cpu')
91
+ self.cpu = attributes[:'cpu']
92
+ end
93
+
94
+ if attributes.key?(:'cpu_price')
95
+ self.cpu_price = attributes[:'cpu_price']
96
+ end
97
+
98
+ if attributes.key?(:'disk_gb')
99
+ self.disk_gb = attributes[:'disk_gb']
100
+ end
101
+
102
+ if attributes.key?(:'disk_price')
103
+ self.disk_price = attributes[:'disk_price']
104
+ end
105
+
106
+ if attributes.key?(:'ram_gb')
107
+ self.ram_gb = attributes[:'ram_gb']
108
+ end
109
+
110
+ if attributes.key?(:'ram_price')
111
+ self.ram_price = attributes[:'ram_price']
112
+ end
113
+
114
+ if attributes.key?(:'time')
115
+ self.time = attributes[:'time']
116
+ end
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properties with the reasons
121
+ def list_invalid_properties
122
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
123
+ invalid_properties = Array.new
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ true
132
+ end
133
+
134
+ # Checks equality by comparing each attribute.
135
+ # @param [Object] Object to be compared
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ cpu == o.cpu &&
140
+ cpu_price == o.cpu_price &&
141
+ disk_gb == o.disk_gb &&
142
+ disk_price == o.disk_price &&
143
+ ram_gb == o.ram_gb &&
144
+ ram_price == o.ram_price &&
145
+ time == o.time
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [cpu, cpu_price, disk_gb, disk_price, ram_gb, ram_price, time].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def self.build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ attributes = attributes.transform_keys(&:to_sym)
166
+ transformed_hash = {}
167
+ openapi_types.each_pair do |key, type|
168
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = nil
170
+ elsif type =~ /\AArray<(.*)>/i
171
+ # check to ensure the input is an array given that the attribute
172
+ # is documented as an array but the input is not
173
+ if attributes[attribute_map[key]].is_a?(Array)
174
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
175
+ end
176
+ elsif !attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
178
+ end
179
+ end
180
+ new(transformed_hash)
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ end
200
+
201
+ end