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,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 ModelsUsagePeriod < ApiModelBase
18
+ attr_accessor :cpu
19
+
20
+ attr_accessor :disk_gb
21
+
22
+ attr_accessor :end_at
23
+
24
+ attr_accessor :gpu
25
+
26
+ attr_accessor :price
27
+
28
+ attr_accessor :ram_gb
29
+
30
+ attr_accessor :start_at
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'cpu' => :'cpu',
36
+ :'disk_gb' => :'diskGB',
37
+ :'end_at' => :'endAt',
38
+ :'gpu' => :'gpu',
39
+ :'price' => :'price',
40
+ :'ram_gb' => :'ramGB',
41
+ :'start_at' => :'startAt'
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
+ :'disk_gb' => :'Integer',
60
+ :'end_at' => :'String',
61
+ :'gpu' => :'Integer',
62
+ :'price' => :'Float',
63
+ :'ram_gb' => :'Integer',
64
+ :'start_at' => :'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::ModelsUsagePeriod` 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::ModelsUsagePeriod`. 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?(:'disk_gb')
95
+ self.disk_gb = attributes[:'disk_gb']
96
+ end
97
+
98
+ if attributes.key?(:'end_at')
99
+ self.end_at = attributes[:'end_at']
100
+ end
101
+
102
+ if attributes.key?(:'gpu')
103
+ self.gpu = attributes[:'gpu']
104
+ end
105
+
106
+ if attributes.key?(:'price')
107
+ self.price = attributes[:'price']
108
+ end
109
+
110
+ if attributes.key?(:'ram_gb')
111
+ self.ram_gb = attributes[:'ram_gb']
112
+ end
113
+
114
+ if attributes.key?(:'start_at')
115
+ self.start_at = attributes[:'start_at']
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
+ disk_gb == o.disk_gb &&
141
+ end_at == o.end_at &&
142
+ gpu == o.gpu &&
143
+ price == o.price &&
144
+ ram_gb == o.ram_gb &&
145
+ start_at == o.start_at
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, disk_gb, end_at, gpu, price, ram_gb, start_at].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,15 @@
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
+ module DaytonaAnalyticsApiClient
14
+ VERSION = '0.197.0'
15
+ end
@@ -0,0 +1,50 @@
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
+ # Common files
14
+ require 'daytona_analytics_api_client/api_client'
15
+ require 'daytona_analytics_api_client/api_error'
16
+ require 'daytona_analytics_api_client/api_model_base'
17
+ require 'daytona_analytics_api_client/version'
18
+ require 'daytona_analytics_api_client/configuration'
19
+
20
+ # Models
21
+ require 'daytona_analytics_api_client/models/models_aggregated_usage'
22
+ require 'daytona_analytics_api_client/models/models_log_entry'
23
+ require 'daytona_analytics_api_client/models/models_metric_point'
24
+ require 'daytona_analytics_api_client/models/models_sandbox_usage'
25
+ require 'daytona_analytics_api_client/models/models_span'
26
+ require 'daytona_analytics_api_client/models/models_trace_summary'
27
+ require 'daytona_analytics_api_client/models/models_usage_chart_point'
28
+ require 'daytona_analytics_api_client/models/models_usage_period'
29
+
30
+ # APIs
31
+ require 'daytona_analytics_api_client/api/telemetry_api'
32
+ require 'daytona_analytics_api_client/api/usage_api'
33
+
34
+ module DaytonaAnalyticsApiClient
35
+ class << self
36
+ # Customize default settings for the SDK using block.
37
+ # DaytonaAnalyticsApiClient.configure do |config|
38
+ # config.username = "xxx"
39
+ # config.password = "xxx"
40
+ # end
41
+ # If no block given, return the default Configuration object.
42
+ def configure
43
+ if block_given?
44
+ yield(Configuration.default)
45
+ else
46
+ Configuration.default
47
+ end
48
+ end
49
+ end
50
+ end
data/project.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "analytics-api-client-ruby",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "projectType": "library",
5
+ "sourceRoot": "analytics-api-client-ruby",
6
+ "tags": [],
7
+ "targets": {
8
+ "build": {
9
+ "executor": "nx:run-commands",
10
+ "options": {
11
+ "cwd": "{projectRoot}",
12
+ "commands": ["rm -f *.gem", "bundle install", "gem build daytona_analytics_api_client.gemspec"],
13
+ "parallel": false
14
+ },
15
+ "dependsOn": ["set-version"],
16
+ "inputs": ["default", { "dependentTasksOutputFiles": "**/*", "transitive": true }],
17
+ "outputs": ["{projectRoot}/**/*.gem"]
18
+ },
19
+ "set-version": {
20
+ "executor": "nx:run-commands",
21
+ "options": {
22
+ "cwd": "{projectRoot}",
23
+ "command": "if [ -n \"$RUBYGEMS_PKG_VERSION\" ]; then sed -i \"s/VERSION = '[^']*'/VERSION = '$RUBYGEMS_PKG_VERSION'/\" lib/daytona_analytics_api_client/version.rb && echo \"Changed version to $RUBYGEMS_PKG_VERSION\"; else echo \"Using version from version.rb\"; fi"
24
+ },
25
+ "cache": true,
26
+ "inputs": [{ "env": "RUBYGEMS_PKG_VERSION" }, { "env": "VERSION" }],
27
+ "outputs": ["{projectRoot}/lib/daytona_analytics_api_client/version.rb"]
28
+ },
29
+ "generate:api-client": {
30
+ "executor": "nx:run-commands",
31
+ "outputs": ["{projectRoot}/lib"],
32
+ "options": {
33
+ "commands": [
34
+ "rm -rf analytics-api-client-ruby/lib",
35
+ "yarn run openapi-generator-cli generate -i openapi-specs/analytics.json -g ruby -t hack/ruby-client/openapi-templates --additional-properties=gemAuthor=daytonaio,gemAuthorEmail=support@daytona.io,gemDescription=\\\"Daytona Analytics API Client\\\",gemHomepage=\\\"https://github.com/daytona/clients\\\",gemVersion=$DEFAULT_GEM_VERSION,gemName=daytona_analytics_api_client,enumUnknownDefaultCase=true -o analytics-api-client-ruby",
36
+ "bash analytics-api-client-ruby/fix-gemspec.sh",
37
+ "sed -i 's|OpenAPI-Generator/#{VERSION}/ruby|analytics-api-client-ruby/#{VERSION}|' analytics-api-client-ruby/lib/daytona_analytics_api_client/api_client.rb",
38
+ "cd analytics-api-client-ruby && bundle install"
39
+ ],
40
+ "parallel": false
41
+ },
42
+ "cache": true,
43
+ "inputs": [
44
+ "{workspaceRoot}/openapi-specs/analytics.json",
45
+ "{workspaceRoot}/hack/ruby-client/openapi-templates/**/*",
46
+ { "env": "DEFAULT_GEM_VERSION" }
47
+ ]
48
+ },
49
+ "publish": {
50
+ "executor": "nx:run-commands",
51
+ "options": {
52
+ "cwd": "{projectRoot}",
53
+ "commands": [
54
+ "mkdir -p ~/.gem && echo \":rubygems: $RUBYGEMS_API_KEY\" > ~/.gem/credentials && chmod 0600 ~/.gem/credentials",
55
+ "gem push daytona_analytics_api_client-*.gem --key rubygems --host https://rubygems.org"
56
+ ],
57
+ "parallel": false
58
+ },
59
+ "dependsOn": ["build"]
60
+ }
61
+ }
62
+ }
metadata ADDED
@@ -0,0 +1,106 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: daytona_analytics_api_client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.197.0
5
+ platform: ruby
6
+ authors:
7
+ - daytonaio
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: typhoeus
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '1.0'
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 1.0.1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '1.0'
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 1.0.1
32
+ - !ruby/object:Gem::Dependency
33
+ name: rspec
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - "~>"
37
+ - !ruby/object:Gem::Version
38
+ version: '3.6'
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 3.6.0
42
+ type: :development
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '3.6'
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: 3.6.0
52
+ description: Daytona Analytics API Client
53
+ email:
54
+ - support@daytona.io
55
+ executables: []
56
+ extensions: []
57
+ extra_rdoc_files: []
58
+ files:
59
+ - ".gitignore"
60
+ - ".openapi-generator-ignore"
61
+ - ".openapi-generator/FILES"
62
+ - ".openapi-generator/VERSION"
63
+ - ".rspec"
64
+ - ".rubocop.yml"
65
+ - Rakefile
66
+ - daytona_analytics_api_client.gemspec
67
+ - fix-gemspec.sh
68
+ - lib/daytona_analytics_api_client.rb
69
+ - lib/daytona_analytics_api_client/api/telemetry_api.rb
70
+ - lib/daytona_analytics_api_client/api/usage_api.rb
71
+ - lib/daytona_analytics_api_client/api_client.rb
72
+ - lib/daytona_analytics_api_client/api_error.rb
73
+ - lib/daytona_analytics_api_client/api_model_base.rb
74
+ - lib/daytona_analytics_api_client/configuration.rb
75
+ - lib/daytona_analytics_api_client/models/models_aggregated_usage.rb
76
+ - lib/daytona_analytics_api_client/models/models_log_entry.rb
77
+ - lib/daytona_analytics_api_client/models/models_metric_point.rb
78
+ - lib/daytona_analytics_api_client/models/models_sandbox_usage.rb
79
+ - lib/daytona_analytics_api_client/models/models_span.rb
80
+ - lib/daytona_analytics_api_client/models/models_trace_summary.rb
81
+ - lib/daytona_analytics_api_client/models/models_usage_chart_point.rb
82
+ - lib/daytona_analytics_api_client/models/models_usage_period.rb
83
+ - lib/daytona_analytics_api_client/version.rb
84
+ - project.json
85
+ homepage: https://github.com/daytonaio/daytona
86
+ licenses:
87
+ - Unlicense
88
+ metadata: {}
89
+ rdoc_options: []
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '2.7'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubygems_version: 3.6.9
104
+ specification_version: 4
105
+ summary: Daytona Analytics API Ruby Gem
106
+ test_files: []