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,223 @@
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 ModelsLogEntry < ApiModelBase
18
+ attr_accessor :body
19
+
20
+ attr_accessor :log_attributes
21
+
22
+ attr_accessor :resource_attributes
23
+
24
+ attr_accessor :service_name
25
+
26
+ attr_accessor :severity_number
27
+
28
+ attr_accessor :severity_text
29
+
30
+ attr_accessor :span_id
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
+ :'body' => :'body',
40
+ :'log_attributes' => :'logAttributes',
41
+ :'resource_attributes' => :'resourceAttributes',
42
+ :'service_name' => :'serviceName',
43
+ :'severity_number' => :'severityNumber',
44
+ :'severity_text' => :'severityText',
45
+ :'span_id' => :'spanId',
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
+ :'body' => :'String',
65
+ :'log_attributes' => :'Hash<String, String>',
66
+ :'resource_attributes' => :'Hash<String, String>',
67
+ :'service_name' => :'String',
68
+ :'severity_number' => :'Integer',
69
+ :'severity_text' => :'String',
70
+ :'span_id' => :'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::ModelsLogEntry` 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::ModelsLogEntry`. 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?(:'body')
99
+ self.body = attributes[:'body']
100
+ end
101
+
102
+ if attributes.key?(:'log_attributes')
103
+ if (value = attributes[:'log_attributes']).is_a?(Hash)
104
+ self.log_attributes = value
105
+ end
106
+ end
107
+
108
+ if attributes.key?(:'resource_attributes')
109
+ if (value = attributes[:'resource_attributes']).is_a?(Hash)
110
+ self.resource_attributes = value
111
+ end
112
+ end
113
+
114
+ if attributes.key?(:'service_name')
115
+ self.service_name = attributes[:'service_name']
116
+ end
117
+
118
+ if attributes.key?(:'severity_number')
119
+ self.severity_number = attributes[:'severity_number']
120
+ end
121
+
122
+ if attributes.key?(:'severity_text')
123
+ self.severity_text = attributes[:'severity_text']
124
+ end
125
+
126
+ if attributes.key?(:'span_id')
127
+ self.span_id = attributes[:'span_id']
128
+ end
129
+
130
+ if attributes.key?(:'timestamp')
131
+ self.timestamp = attributes[:'timestamp']
132
+ end
133
+
134
+ if attributes.key?(:'trace_id')
135
+ self.trace_id = attributes[:'trace_id']
136
+ end
137
+ end
138
+
139
+ # Show invalid properties with the reasons. Usually used together with valid?
140
+ # @return Array for valid properties with the reasons
141
+ def list_invalid_properties
142
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
143
+ invalid_properties = Array.new
144
+ invalid_properties
145
+ end
146
+
147
+ # Check to see if the all the properties in the model are valid
148
+ # @return true if the model is valid
149
+ def valid?
150
+ warn '[DEPRECATED] the `valid?` method is obsolete'
151
+ true
152
+ end
153
+
154
+ # Checks equality by comparing each attribute.
155
+ # @param [Object] Object to be compared
156
+ def ==(o)
157
+ return true if self.equal?(o)
158
+ self.class == o.class &&
159
+ body == o.body &&
160
+ log_attributes == o.log_attributes &&
161
+ resource_attributes == o.resource_attributes &&
162
+ service_name == o.service_name &&
163
+ severity_number == o.severity_number &&
164
+ severity_text == o.severity_text &&
165
+ span_id == o.span_id &&
166
+ timestamp == o.timestamp &&
167
+ trace_id == o.trace_id
168
+ end
169
+
170
+ # @see the `==` method
171
+ # @param [Object] Object to be compared
172
+ def eql?(o)
173
+ self == o
174
+ end
175
+
176
+ # Calculates hash code according to all attributes.
177
+ # @return [Integer] Hash code
178
+ def hash
179
+ [body, log_attributes, resource_attributes, service_name, severity_number, severity_text, span_id, timestamp, trace_id].hash
180
+ end
181
+
182
+ # Builds the object from hash
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ # @return [Object] Returns the model itself
185
+ def self.build_from_hash(attributes)
186
+ return nil unless attributes.is_a?(Hash)
187
+ attributes = attributes.transform_keys(&:to_sym)
188
+ transformed_hash = {}
189
+ openapi_types.each_pair do |key, type|
190
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
191
+ transformed_hash["#{key}"] = nil
192
+ elsif type =~ /\AArray<(.*)>/i
193
+ # check to ensure the input is an array given that the attribute
194
+ # is documented as an array but the input is not
195
+ if attributes[attribute_map[key]].is_a?(Array)
196
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
197
+ end
198
+ elsif !attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
200
+ end
201
+ end
202
+ new(transformed_hash)
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ end
222
+
223
+ end
@@ -0,0 +1,165 @@
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 ModelsMetricPoint < ApiModelBase
18
+ attr_accessor :metric_name
19
+
20
+ attr_accessor :timestamp
21
+
22
+ attr_accessor :value
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'metric_name' => :'metricName',
28
+ :'timestamp' => :'timestamp',
29
+ :'value' => :'value'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'metric_name' => :'String',
47
+ :'timestamp' => :'String',
48
+ :'value' => :'Float'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaAnalyticsApiClient::ModelsMetricPoint` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaAnalyticsApiClient::ModelsMetricPoint`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'metric_name')
75
+ self.metric_name = attributes[:'metric_name']
76
+ end
77
+
78
+ if attributes.key?(:'timestamp')
79
+ self.timestamp = attributes[:'timestamp']
80
+ end
81
+
82
+ if attributes.key?(:'value')
83
+ self.value = attributes[:'value']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ metric_name == o.metric_name &&
108
+ timestamp == o.timestamp &&
109
+ value == o.value
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [metric_name, timestamp, value].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -0,0 +1,210 @@
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 ModelsSandboxUsage < ApiModelBase
18
+ attr_accessor :first_start
19
+
20
+ attr_accessor :last_end
21
+
22
+ attr_accessor :sandbox_id
23
+
24
+ attr_accessor :total_cpu_seconds
25
+
26
+ attr_accessor :total_disk_gb_seconds
27
+
28
+ attr_accessor :total_gpu_seconds
29
+
30
+ attr_accessor :total_price
31
+
32
+ attr_accessor :total_ramgb_seconds
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'first_start' => :'firstStart',
38
+ :'last_end' => :'lastEnd',
39
+ :'sandbox_id' => :'sandboxId',
40
+ :'total_cpu_seconds' => :'totalCPUSeconds',
41
+ :'total_disk_gb_seconds' => :'totalDiskGBSeconds',
42
+ :'total_gpu_seconds' => :'totalGPUSeconds',
43
+ :'total_price' => :'totalPrice',
44
+ :'total_ramgb_seconds' => :'totalRAMGBSeconds'
45
+ }
46
+ end
47
+
48
+ # Returns attribute mapping this model knows about
49
+ def self.acceptable_attribute_map
50
+ attribute_map
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ acceptable_attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'first_start' => :'String',
62
+ :'last_end' => :'String',
63
+ :'sandbox_id' => :'String',
64
+ :'total_cpu_seconds' => :'Integer',
65
+ :'total_disk_gb_seconds' => :'Integer',
66
+ :'total_gpu_seconds' => :'Integer',
67
+ :'total_price' => :'Float',
68
+ :'total_ramgb_seconds' => :'Integer'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaAnalyticsApiClient::ModelsSandboxUsage` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!acceptable_attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaAnalyticsApiClient::ModelsSandboxUsage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'first_start')
95
+ self.first_start = attributes[:'first_start']
96
+ end
97
+
98
+ if attributes.key?(:'last_end')
99
+ self.last_end = attributes[:'last_end']
100
+ end
101
+
102
+ if attributes.key?(:'sandbox_id')
103
+ self.sandbox_id = attributes[:'sandbox_id']
104
+ end
105
+
106
+ if attributes.key?(:'total_cpu_seconds')
107
+ self.total_cpu_seconds = attributes[:'total_cpu_seconds']
108
+ end
109
+
110
+ if attributes.key?(:'total_disk_gb_seconds')
111
+ self.total_disk_gb_seconds = attributes[:'total_disk_gb_seconds']
112
+ end
113
+
114
+ if attributes.key?(:'total_gpu_seconds')
115
+ self.total_gpu_seconds = attributes[:'total_gpu_seconds']
116
+ end
117
+
118
+ if attributes.key?(:'total_price')
119
+ self.total_price = attributes[:'total_price']
120
+ end
121
+
122
+ if attributes.key?(:'total_ramgb_seconds')
123
+ self.total_ramgb_seconds = attributes[:'total_ramgb_seconds']
124
+ end
125
+ end
126
+
127
+ # Show invalid properties with the reasons. Usually used together with valid?
128
+ # @return Array for valid properties with the reasons
129
+ def list_invalid_properties
130
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
131
+ invalid_properties = Array.new
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
+ true
140
+ end
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param [Object] Object to be compared
144
+ def ==(o)
145
+ return true if self.equal?(o)
146
+ self.class == o.class &&
147
+ first_start == o.first_start &&
148
+ last_end == o.last_end &&
149
+ sandbox_id == o.sandbox_id &&
150
+ total_cpu_seconds == o.total_cpu_seconds &&
151
+ total_disk_gb_seconds == o.total_disk_gb_seconds &&
152
+ total_gpu_seconds == o.total_gpu_seconds &&
153
+ total_price == o.total_price &&
154
+ total_ramgb_seconds == o.total_ramgb_seconds
155
+ end
156
+
157
+ # @see the `==` method
158
+ # @param [Object] Object to be compared
159
+ def eql?(o)
160
+ self == o
161
+ end
162
+
163
+ # Calculates hash code according to all attributes.
164
+ # @return [Integer] Hash code
165
+ def hash
166
+ [first_start, last_end, sandbox_id, total_cpu_seconds, total_disk_gb_seconds, total_gpu_seconds, total_price, total_ramgb_seconds].hash
167
+ end
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def self.build_from_hash(attributes)
173
+ return nil unless attributes.is_a?(Hash)
174
+ attributes = attributes.transform_keys(&:to_sym)
175
+ transformed_hash = {}
176
+ openapi_types.each_pair do |key, type|
177
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = nil
179
+ elsif type =~ /\AArray<(.*)>/i
180
+ # check to ensure the input is an array given that the attribute
181
+ # is documented as an array but the input is not
182
+ if attributes[attribute_map[key]].is_a?(Array)
183
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
184
+ end
185
+ elsif !attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
187
+ end
188
+ end
189
+ new(transformed_hash)
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ end
209
+
210
+ end