nightona_toolbox_api_client 0.191.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.
Files changed (120) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +39 -0
  3. data/.openapi-generator/FILES +113 -0
  4. data/.openapi-generator/VERSION +1 -0
  5. data/.openapi-generator-ignore +13 -0
  6. data/.rspec +2 -0
  7. data/.rubocop.yml +148 -0
  8. data/Rakefile +10 -0
  9. data/fix-gemspec.sh +13 -0
  10. data/lib/nightona_toolbox_api_client/api/computer_use_api.rb +2179 -0
  11. data/lib/nightona_toolbox_api_client/api/file_system_api.rb +893 -0
  12. data/lib/nightona_toolbox_api_client/api/git_api.rb +744 -0
  13. data/lib/nightona_toolbox_api_client/api/info_api.rb +193 -0
  14. data/lib/nightona_toolbox_api_client/api/interpreter_api.rb +267 -0
  15. data/lib/nightona_toolbox_api_client/api/lsp_api.rb +510 -0
  16. data/lib/nightona_toolbox_api_client/api/port_api.rb +142 -0
  17. data/lib/nightona_toolbox_api_client/api/process_api.rb +1201 -0
  18. data/lib/nightona_toolbox_api_client/api/server_api.rb +85 -0
  19. data/lib/nightona_toolbox_api_client/api_client.rb +397 -0
  20. data/lib/nightona_toolbox_api_client/api_error.rb +58 -0
  21. data/lib/nightona_toolbox_api_client/api_model_base.rb +88 -0
  22. data/lib/nightona_toolbox_api_client/configuration.rb +308 -0
  23. data/lib/nightona_toolbox_api_client/models/accessibility_bounds.rb +174 -0
  24. data/lib/nightona_toolbox_api_client/models/accessibility_invoke_request.rb +173 -0
  25. data/lib/nightona_toolbox_api_client/models/accessibility_node_request.rb +164 -0
  26. data/lib/nightona_toolbox_api_client/models/accessibility_nodes_response.rb +158 -0
  27. data/lib/nightona_toolbox_api_client/models/accessibility_set_value_request.rb +173 -0
  28. data/lib/nightona_toolbox_api_client/models/accessibility_tree_response.rb +156 -0
  29. data/lib/nightona_toolbox_api_client/models/chart.rb +256 -0
  30. data/lib/nightona_toolbox_api_client/models/chart_element.rb +295 -0
  31. data/lib/nightona_toolbox_api_client/models/code_run_artifacts.rb +149 -0
  32. data/lib/nightona_toolbox_api_client/models/code_run_request.rb +222 -0
  33. data/lib/nightona_toolbox_api_client/models/code_run_response.rb +165 -0
  34. data/lib/nightona_toolbox_api_client/models/command.rb +199 -0
  35. data/lib/nightona_toolbox_api_client/models/completion_context.rb +173 -0
  36. data/lib/nightona_toolbox_api_client/models/completion_item.rb +218 -0
  37. data/lib/nightona_toolbox_api_client/models/completion_list.rb +192 -0
  38. data/lib/nightona_toolbox_api_client/models/computer_use_accessibility_node.rb +216 -0
  39. data/lib/nightona_toolbox_api_client/models/computer_use_start_response.rb +158 -0
  40. data/lib/nightona_toolbox_api_client/models/computer_use_status_response.rb +147 -0
  41. data/lib/nightona_toolbox_api_client/models/computer_use_stop_response.rb +158 -0
  42. data/lib/nightona_toolbox_api_client/models/create_context_request.rb +156 -0
  43. data/lib/nightona_toolbox_api_client/models/create_session_request.rb +164 -0
  44. data/lib/nightona_toolbox_api_client/models/display_info.rb +192 -0
  45. data/lib/nightona_toolbox_api_client/models/display_info_response.rb +149 -0
  46. data/lib/nightona_toolbox_api_client/models/execute_request.rb +196 -0
  47. data/lib/nightona_toolbox_api_client/models/execute_response.rb +173 -0
  48. data/lib/nightona_toolbox_api_client/models/file_info.rb +373 -0
  49. data/lib/nightona_toolbox_api_client/models/file_status.rb +264 -0
  50. data/lib/nightona_toolbox_api_client/models/files_download_request.rb +166 -0
  51. data/lib/nightona_toolbox_api_client/models/find_accessibility_nodes_request.rb +204 -0
  52. data/lib/nightona_toolbox_api_client/models/git_add_request.rb +193 -0
  53. data/lib/nightona_toolbox_api_client/models/git_branch_request.rb +190 -0
  54. data/lib/nightona_toolbox_api_client/models/git_checkout_request.rb +190 -0
  55. data/lib/nightona_toolbox_api_client/models/git_clone_request.rb +236 -0
  56. data/lib/nightona_toolbox_api_client/models/git_commit_info.rb +268 -0
  57. data/lib/nightona_toolbox_api_client/models/git_commit_request.rb +251 -0
  58. data/lib/nightona_toolbox_api_client/models/git_commit_response.rb +164 -0
  59. data/lib/nightona_toolbox_api_client/models/git_delete_branch_request.rb +190 -0
  60. data/lib/nightona_toolbox_api_client/models/git_repo_request.rb +182 -0
  61. data/lib/nightona_toolbox_api_client/models/git_status.rb +219 -0
  62. data/lib/nightona_toolbox_api_client/models/initialize_request.rb +164 -0
  63. data/lib/nightona_toolbox_api_client/models/interpreter_context.rb +268 -0
  64. data/lib/nightona_toolbox_api_client/models/is_port_in_use_response.rb +147 -0
  65. data/lib/nightona_toolbox_api_client/models/keyboard_hotkey_request.rb +148 -0
  66. data/lib/nightona_toolbox_api_client/models/keyboard_press_request.rb +159 -0
  67. data/lib/nightona_toolbox_api_client/models/keyboard_type_request.rb +157 -0
  68. data/lib/nightona_toolbox_api_client/models/list_branch_response.rb +166 -0
  69. data/lib/nightona_toolbox_api_client/models/list_contexts_response.rb +166 -0
  70. data/lib/nightona_toolbox_api_client/models/list_recordings_response.rb +166 -0
  71. data/lib/nightona_toolbox_api_client/models/lsp_completion_params.rb +251 -0
  72. data/lib/nightona_toolbox_api_client/models/lsp_document_request.rb +216 -0
  73. data/lib/nightona_toolbox_api_client/models/lsp_location.rb +190 -0
  74. data/lib/nightona_toolbox_api_client/models/lsp_position.rb +190 -0
  75. data/lib/nightona_toolbox_api_client/models/lsp_range.rb +190 -0
  76. data/lib/nightona_toolbox_api_client/models/lsp_server_request.rb +190 -0
  77. data/lib/nightona_toolbox_api_client/models/lsp_symbol.rb +216 -0
  78. data/lib/nightona_toolbox_api_client/models/match.rb +216 -0
  79. data/lib/nightona_toolbox_api_client/models/mouse_click_request.rb +175 -0
  80. data/lib/nightona_toolbox_api_client/models/mouse_click_response.rb +156 -0
  81. data/lib/nightona_toolbox_api_client/models/mouse_drag_request.rb +183 -0
  82. data/lib/nightona_toolbox_api_client/models/mouse_drag_response.rb +156 -0
  83. data/lib/nightona_toolbox_api_client/models/mouse_move_request.rb +156 -0
  84. data/lib/nightona_toolbox_api_client/models/mouse_position_response.rb +156 -0
  85. data/lib/nightona_toolbox_api_client/models/mouse_scroll_request.rb +194 -0
  86. data/lib/nightona_toolbox_api_client/models/port_list.rb +149 -0
  87. data/lib/nightona_toolbox_api_client/models/position.rb +156 -0
  88. data/lib/nightona_toolbox_api_client/models/process_errors_response.rb +156 -0
  89. data/lib/nightona_toolbox_api_client/models/process_logs_response.rb +156 -0
  90. data/lib/nightona_toolbox_api_client/models/process_restart_response.rb +156 -0
  91. data/lib/nightona_toolbox_api_client/models/process_status.rb +174 -0
  92. data/lib/nightona_toolbox_api_client/models/process_status_response.rb +156 -0
  93. data/lib/nightona_toolbox_api_client/models/pty_create_request.rb +195 -0
  94. data/lib/nightona_toolbox_api_client/models/pty_create_response.rb +164 -0
  95. data/lib/nightona_toolbox_api_client/models/pty_list_response.rb +166 -0
  96. data/lib/nightona_toolbox_api_client/models/pty_resize_request.rb +226 -0
  97. data/lib/nightona_toolbox_api_client/models/pty_session_info.rb +349 -0
  98. data/lib/nightona_toolbox_api_client/models/recording.rb +295 -0
  99. data/lib/nightona_toolbox_api_client/models/replace_request.rb +218 -0
  100. data/lib/nightona_toolbox_api_client/models/replace_result.rb +165 -0
  101. data/lib/nightona_toolbox_api_client/models/screenshot_response.rb +165 -0
  102. data/lib/nightona_toolbox_api_client/models/scroll_response.rb +147 -0
  103. data/lib/nightona_toolbox_api_client/models/search_files_response.rb +166 -0
  104. data/lib/nightona_toolbox_api_client/models/session.rb +192 -0
  105. data/lib/nightona_toolbox_api_client/models/session_command_logs_response.rb +216 -0
  106. data/lib/nightona_toolbox_api_client/models/session_execute_request.rb +191 -0
  107. data/lib/nightona_toolbox_api_client/models/session_execute_response.rb +200 -0
  108. data/lib/nightona_toolbox_api_client/models/session_send_input_request.rb +164 -0
  109. data/lib/nightona_toolbox_api_client/models/start_recording_request.rb +147 -0
  110. data/lib/nightona_toolbox_api_client/models/status.rb +47 -0
  111. data/lib/nightona_toolbox_api_client/models/stop_recording_request.rb +164 -0
  112. data/lib/nightona_toolbox_api_client/models/user_home_dir_response.rb +164 -0
  113. data/lib/nightona_toolbox_api_client/models/window_info.rb +201 -0
  114. data/lib/nightona_toolbox_api_client/models/windows_response.rb +149 -0
  115. data/lib/nightona_toolbox_api_client/models/work_dir_response.rb +164 -0
  116. data/lib/nightona_toolbox_api_client/version.rb +15 -0
  117. data/lib/nightona_toolbox_api_client.rb +142 -0
  118. data/nightona_toolbox_api_client.gemspec +39 -0
  119. data/project.json +71 -0
  120. metadata +200 -0
@@ -0,0 +1,164 @@
1
+ =begin
2
+ #Nightona Toolbox API
3
+
4
+ #Nightona Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Nightona API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Nightona Cloud: `https://proxy.app.daytona.io/toolbox/{sandboxId}`.
5
+
6
+ The version of the OpenAPI document: v0.0.0-dev
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 NightonaToolboxApiClient
17
+ class InitializeRequest < ApiModelBase
18
+ attr_accessor :token
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'token' => :'token'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'token' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaToolboxApiClient::InitializeRequest` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaToolboxApiClient::InitializeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'token')
67
+ self.token = attributes[:'token']
68
+ else
69
+ self.token = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @token.nil?
79
+ invalid_properties.push('invalid value for "token", token cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @token.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] token Value to be assigned
95
+ def token=(token)
96
+ if token.nil?
97
+ fail ArgumentError, 'token cannot be nil'
98
+ end
99
+
100
+ @token = token
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ token == o.token
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [token].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -0,0 +1,268 @@
1
+ =begin
2
+ #Nightona Toolbox API
3
+
4
+ #Nightona Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Nightona API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Nightona Cloud: `https://proxy.app.daytona.io/toolbox/{sandboxId}`.
5
+
6
+ The version of the OpenAPI document: v0.0.0-dev
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 NightonaToolboxApiClient
17
+ class InterpreterContext < ApiModelBase
18
+ attr_accessor :active
19
+
20
+ attr_accessor :created_at
21
+
22
+ attr_accessor :cwd
23
+
24
+ attr_accessor :id
25
+
26
+ attr_accessor :language
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'active' => :'active',
32
+ :'created_at' => :'createdAt',
33
+ :'cwd' => :'cwd',
34
+ :'id' => :'id',
35
+ :'language' => :'language'
36
+ }
37
+ end
38
+
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ acceptable_attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'active' => :'Boolean',
53
+ :'created_at' => :'String',
54
+ :'cwd' => :'String',
55
+ :'id' => :'String',
56
+ :'language' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaToolboxApiClient::InterpreterContext` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaToolboxApiClient::InterpreterContext`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'active')
83
+ self.active = attributes[:'active']
84
+ else
85
+ self.active = nil
86
+ end
87
+
88
+ if attributes.key?(:'created_at')
89
+ self.created_at = attributes[:'created_at']
90
+ else
91
+ self.created_at = nil
92
+ end
93
+
94
+ if attributes.key?(:'cwd')
95
+ self.cwd = attributes[:'cwd']
96
+ else
97
+ self.cwd = nil
98
+ end
99
+
100
+ if attributes.key?(:'id')
101
+ self.id = attributes[:'id']
102
+ else
103
+ self.id = nil
104
+ end
105
+
106
+ if attributes.key?(:'language')
107
+ self.language = attributes[:'language']
108
+ else
109
+ self.language = nil
110
+ end
111
+ end
112
+
113
+ # Show invalid properties with the reasons. Usually used together with valid?
114
+ # @return Array for valid properties with the reasons
115
+ def list_invalid_properties
116
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
+ invalid_properties = Array.new
118
+ if @active.nil?
119
+ invalid_properties.push('invalid value for "active", active cannot be nil.')
120
+ end
121
+
122
+ if @created_at.nil?
123
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
124
+ end
125
+
126
+ if @cwd.nil?
127
+ invalid_properties.push('invalid value for "cwd", cwd cannot be nil.')
128
+ end
129
+
130
+ if @id.nil?
131
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
132
+ end
133
+
134
+ if @language.nil?
135
+ invalid_properties.push('invalid value for "language", language cannot be nil.')
136
+ end
137
+
138
+ invalid_properties
139
+ end
140
+
141
+ # Check to see if the all the properties in the model are valid
142
+ # @return true if the model is valid
143
+ def valid?
144
+ warn '[DEPRECATED] the `valid?` method is obsolete'
145
+ return false if @active.nil?
146
+ return false if @created_at.nil?
147
+ return false if @cwd.nil?
148
+ return false if @id.nil?
149
+ return false if @language.nil?
150
+ true
151
+ end
152
+
153
+ # Custom attribute writer method with validation
154
+ # @param [Object] active Value to be assigned
155
+ def active=(active)
156
+ if active.nil?
157
+ fail ArgumentError, 'active cannot be nil'
158
+ end
159
+
160
+ @active = active
161
+ end
162
+
163
+ # Custom attribute writer method with validation
164
+ # @param [Object] created_at Value to be assigned
165
+ def created_at=(created_at)
166
+ if created_at.nil?
167
+ fail ArgumentError, 'created_at cannot be nil'
168
+ end
169
+
170
+ @created_at = created_at
171
+ end
172
+
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] cwd Value to be assigned
175
+ def cwd=(cwd)
176
+ if cwd.nil?
177
+ fail ArgumentError, 'cwd cannot be nil'
178
+ end
179
+
180
+ @cwd = cwd
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] id Value to be assigned
185
+ def id=(id)
186
+ if id.nil?
187
+ fail ArgumentError, 'id cannot be nil'
188
+ end
189
+
190
+ @id = id
191
+ end
192
+
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] language Value to be assigned
195
+ def language=(language)
196
+ if language.nil?
197
+ fail ArgumentError, 'language cannot be nil'
198
+ end
199
+
200
+ @language = language
201
+ end
202
+
203
+ # Checks equality by comparing each attribute.
204
+ # @param [Object] Object to be compared
205
+ def ==(o)
206
+ return true if self.equal?(o)
207
+ self.class == o.class &&
208
+ active == o.active &&
209
+ created_at == o.created_at &&
210
+ cwd == o.cwd &&
211
+ id == o.id &&
212
+ language == o.language
213
+ end
214
+
215
+ # @see the `==` method
216
+ # @param [Object] Object to be compared
217
+ def eql?(o)
218
+ self == o
219
+ end
220
+
221
+ # Calculates hash code according to all attributes.
222
+ # @return [Integer] Hash code
223
+ def hash
224
+ [active, created_at, cwd, id, language].hash
225
+ end
226
+
227
+ # Builds the object from hash
228
+ # @param [Hash] attributes Model attributes in the form of hash
229
+ # @return [Object] Returns the model itself
230
+ def self.build_from_hash(attributes)
231
+ return nil unless attributes.is_a?(Hash)
232
+ attributes = attributes.transform_keys(&:to_sym)
233
+ transformed_hash = {}
234
+ openapi_types.each_pair do |key, type|
235
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
236
+ transformed_hash["#{key}"] = nil
237
+ elsif type =~ /\AArray<(.*)>/i
238
+ # check to ensure the input is an array given that the attribute
239
+ # is documented as an array but the input is not
240
+ if attributes[attribute_map[key]].is_a?(Array)
241
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
242
+ end
243
+ elsif !attributes[attribute_map[key]].nil?
244
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
245
+ end
246
+ end
247
+ new(transformed_hash)
248
+ end
249
+
250
+ # Returns the object in the form of hash
251
+ # @return [Hash] Returns the object in the form of hash
252
+ def to_hash
253
+ hash = {}
254
+ self.class.attribute_map.each_pair do |attr, param|
255
+ value = self.send(attr)
256
+ if value.nil?
257
+ is_nullable = self.class.openapi_nullable.include?(attr)
258
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
259
+ end
260
+
261
+ hash[param] = _to_hash(value)
262
+ end
263
+ hash
264
+ end
265
+
266
+ end
267
+
268
+ end
@@ -0,0 +1,147 @@
1
+ =begin
2
+ #Nightona Toolbox API
3
+
4
+ #Nightona Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Nightona API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Nightona Cloud: `https://proxy.app.daytona.io/toolbox/{sandboxId}`.
5
+
6
+ The version of the OpenAPI document: v0.0.0-dev
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 NightonaToolboxApiClient
17
+ class IsPortInUseResponse < ApiModelBase
18
+ attr_accessor :is_in_use
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'is_in_use' => :'isInUse'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'is_in_use' => :'Boolean'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaToolboxApiClient::IsPortInUseResponse` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaToolboxApiClient::IsPortInUseResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'is_in_use')
67
+ self.is_in_use = attributes[:'is_in_use']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ is_in_use == o.is_in_use
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [is_in_use].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ transformed_hash = {}
113
+ openapi_types.each_pair do |key, type|
114
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
+ transformed_hash["#{key}"] = nil
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[attribute_map[key]].is_a?(Array)
120
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+ new(transformed_hash)
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ end