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