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,226 @@
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 PtyResizeRequest < ApiModelBase
18
+ attr_accessor :cols
19
+
20
+ attr_accessor :rows
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'cols' => :'cols',
26
+ :'rows' => :'rows'
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
+ :'cols' => :'Integer',
44
+ :'rows' => :'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::PtyResizeRequest` 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::PtyResizeRequest`. 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?(:'cols')
71
+ self.cols = attributes[:'cols']
72
+ else
73
+ self.cols = nil
74
+ end
75
+
76
+ if attributes.key?(:'rows')
77
+ self.rows = attributes[:'rows']
78
+ else
79
+ self.rows = nil
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ if @cols.nil?
89
+ invalid_properties.push('invalid value for "cols", cols cannot be nil.')
90
+ end
91
+
92
+ if @cols > 1000
93
+ invalid_properties.push('invalid value for "cols", must be smaller than or equal to 1000.')
94
+ end
95
+
96
+ if @cols < 1
97
+ invalid_properties.push('invalid value for "cols", must be greater than or equal to 1.')
98
+ end
99
+
100
+ if @rows.nil?
101
+ invalid_properties.push('invalid value for "rows", rows cannot be nil.')
102
+ end
103
+
104
+ if @rows > 1000
105
+ invalid_properties.push('invalid value for "rows", must be smaller than or equal to 1000.')
106
+ end
107
+
108
+ if @rows < 1
109
+ invalid_properties.push('invalid value for "rows", must be greater than or equal to 1.')
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
119
+ return false if @cols.nil?
120
+ return false if @cols > 1000
121
+ return false if @cols < 1
122
+ return false if @rows.nil?
123
+ return false if @rows > 1000
124
+ return false if @rows < 1
125
+ true
126
+ end
127
+
128
+ # Custom attribute writer method with validation
129
+ # @param [Object] cols Value to be assigned
130
+ def cols=(cols)
131
+ if cols.nil?
132
+ fail ArgumentError, 'cols cannot be nil'
133
+ end
134
+
135
+ if cols > 1000
136
+ fail ArgumentError, 'invalid value for "cols", must be smaller than or equal to 1000.'
137
+ end
138
+
139
+ if cols < 1
140
+ fail ArgumentError, 'invalid value for "cols", must be greater than or equal to 1.'
141
+ end
142
+
143
+ @cols = cols
144
+ end
145
+
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] rows Value to be assigned
148
+ def rows=(rows)
149
+ if rows.nil?
150
+ fail ArgumentError, 'rows cannot be nil'
151
+ end
152
+
153
+ if rows > 1000
154
+ fail ArgumentError, 'invalid value for "rows", must be smaller than or equal to 1000.'
155
+ end
156
+
157
+ if rows < 1
158
+ fail ArgumentError, 'invalid value for "rows", must be greater than or equal to 1.'
159
+ end
160
+
161
+ @rows = rows
162
+ end
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] Object to be compared
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ cols == o.cols &&
170
+ rows == o.rows
171
+ end
172
+
173
+ # @see the `==` method
174
+ # @param [Object] Object to be compared
175
+ def eql?(o)
176
+ self == o
177
+ end
178
+
179
+ # Calculates hash code according to all attributes.
180
+ # @return [Integer] Hash code
181
+ def hash
182
+ [cols, rows].hash
183
+ end
184
+
185
+ # Builds the object from hash
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ # @return [Object] Returns the model itself
188
+ def self.build_from_hash(attributes)
189
+ return nil unless attributes.is_a?(Hash)
190
+ attributes = attributes.transform_keys(&:to_sym)
191
+ transformed_hash = {}
192
+ openapi_types.each_pair do |key, type|
193
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = nil
195
+ elsif type =~ /\AArray<(.*)>/i
196
+ # check to ensure the input is an array given that the attribute
197
+ # is documented as an array but the input is not
198
+ if attributes[attribute_map[key]].is_a?(Array)
199
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
200
+ end
201
+ elsif !attributes[attribute_map[key]].nil?
202
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
203
+ end
204
+ end
205
+ new(transformed_hash)
206
+ end
207
+
208
+ # Returns the object in the form of hash
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_hash
211
+ hash = {}
212
+ self.class.attribute_map.each_pair do |attr, param|
213
+ value = self.send(attr)
214
+ if value.nil?
215
+ is_nullable = self.class.openapi_nullable.include?(attr)
216
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
217
+ end
218
+
219
+ hash[param] = _to_hash(value)
220
+ end
221
+ hash
222
+ end
223
+
224
+ end
225
+
226
+ end
@@ -0,0 +1,349 @@
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 PtySessionInfo < ApiModelBase
18
+ attr_accessor :active
19
+
20
+ attr_accessor :cols
21
+
22
+ attr_accessor :created_at
23
+
24
+ attr_accessor :cwd
25
+
26
+ attr_accessor :envs
27
+
28
+ attr_accessor :id
29
+
30
+ # Whether this session uses lazy start
31
+ attr_accessor :lazy_start
32
+
33
+ attr_accessor :rows
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'active' => :'active',
39
+ :'cols' => :'cols',
40
+ :'created_at' => :'createdAt',
41
+ :'cwd' => :'cwd',
42
+ :'envs' => :'envs',
43
+ :'id' => :'id',
44
+ :'lazy_start' => :'lazyStart',
45
+ :'rows' => :'rows'
46
+ }
47
+ end
48
+
49
+ # Returns attribute mapping this model knows about
50
+ def self.acceptable_attribute_map
51
+ attribute_map
52
+ end
53
+
54
+ # Returns all the JSON keys this model knows about
55
+ def self.acceptable_attributes
56
+ acceptable_attribute_map.values
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ def self.openapi_types
61
+ {
62
+ :'active' => :'Boolean',
63
+ :'cols' => :'Integer',
64
+ :'created_at' => :'String',
65
+ :'cwd' => :'String',
66
+ :'envs' => :'Hash<String, String>',
67
+ :'id' => :'String',
68
+ :'lazy_start' => :'Boolean',
69
+ :'rows' => :'Integer'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ def self.openapi_nullable
75
+ Set.new([
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaToolboxApiClient::PtySessionInfo` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ acceptable_attribute_map = self.class.acceptable_attribute_map
88
+ attributes = attributes.each_with_object({}) { |(k, v), h|
89
+ if (!acceptable_attribute_map.key?(k.to_sym))
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaToolboxApiClient::PtySessionInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
91
+ end
92
+ h[k.to_sym] = v
93
+ }
94
+
95
+ if attributes.key?(:'active')
96
+ self.active = attributes[:'active']
97
+ else
98
+ self.active = nil
99
+ end
100
+
101
+ if attributes.key?(:'cols')
102
+ self.cols = attributes[:'cols']
103
+ else
104
+ self.cols = nil
105
+ end
106
+
107
+ if attributes.key?(:'created_at')
108
+ self.created_at = attributes[:'created_at']
109
+ else
110
+ self.created_at = nil
111
+ end
112
+
113
+ if attributes.key?(:'cwd')
114
+ self.cwd = attributes[:'cwd']
115
+ else
116
+ self.cwd = nil
117
+ end
118
+
119
+ if attributes.key?(:'envs')
120
+ if (value = attributes[:'envs']).is_a?(Hash)
121
+ self.envs = value
122
+ end
123
+ else
124
+ self.envs = nil
125
+ end
126
+
127
+ if attributes.key?(:'id')
128
+ self.id = attributes[:'id']
129
+ else
130
+ self.id = nil
131
+ end
132
+
133
+ if attributes.key?(:'lazy_start')
134
+ self.lazy_start = attributes[:'lazy_start']
135
+ else
136
+ self.lazy_start = nil
137
+ end
138
+
139
+ if attributes.key?(:'rows')
140
+ self.rows = attributes[:'rows']
141
+ else
142
+ self.rows = nil
143
+ end
144
+ end
145
+
146
+ # Show invalid properties with the reasons. Usually used together with valid?
147
+ # @return Array for valid properties with the reasons
148
+ def list_invalid_properties
149
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
150
+ invalid_properties = Array.new
151
+ if @active.nil?
152
+ invalid_properties.push('invalid value for "active", active cannot be nil.')
153
+ end
154
+
155
+ if @cols.nil?
156
+ invalid_properties.push('invalid value for "cols", cols cannot be nil.')
157
+ end
158
+
159
+ if @created_at.nil?
160
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
161
+ end
162
+
163
+ if @cwd.nil?
164
+ invalid_properties.push('invalid value for "cwd", cwd cannot be nil.')
165
+ end
166
+
167
+ if @envs.nil?
168
+ invalid_properties.push('invalid value for "envs", envs cannot be nil.')
169
+ end
170
+
171
+ if @id.nil?
172
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
173
+ end
174
+
175
+ if @lazy_start.nil?
176
+ invalid_properties.push('invalid value for "lazy_start", lazy_start cannot be nil.')
177
+ end
178
+
179
+ if @rows.nil?
180
+ invalid_properties.push('invalid value for "rows", rows cannot be nil.')
181
+ end
182
+
183
+ invalid_properties
184
+ end
185
+
186
+ # Check to see if the all the properties in the model are valid
187
+ # @return true if the model is valid
188
+ def valid?
189
+ warn '[DEPRECATED] the `valid?` method is obsolete'
190
+ return false if @active.nil?
191
+ return false if @cols.nil?
192
+ return false if @created_at.nil?
193
+ return false if @cwd.nil?
194
+ return false if @envs.nil?
195
+ return false if @id.nil?
196
+ return false if @lazy_start.nil?
197
+ return false if @rows.nil?
198
+ true
199
+ end
200
+
201
+ # Custom attribute writer method with validation
202
+ # @param [Object] active Value to be assigned
203
+ def active=(active)
204
+ if active.nil?
205
+ fail ArgumentError, 'active cannot be nil'
206
+ end
207
+
208
+ @active = active
209
+ end
210
+
211
+ # Custom attribute writer method with validation
212
+ # @param [Object] cols Value to be assigned
213
+ def cols=(cols)
214
+ if cols.nil?
215
+ fail ArgumentError, 'cols cannot be nil'
216
+ end
217
+
218
+ @cols = cols
219
+ end
220
+
221
+ # Custom attribute writer method with validation
222
+ # @param [Object] created_at Value to be assigned
223
+ def created_at=(created_at)
224
+ if created_at.nil?
225
+ fail ArgumentError, 'created_at cannot be nil'
226
+ end
227
+
228
+ @created_at = created_at
229
+ end
230
+
231
+ # Custom attribute writer method with validation
232
+ # @param [Object] cwd Value to be assigned
233
+ def cwd=(cwd)
234
+ if cwd.nil?
235
+ fail ArgumentError, 'cwd cannot be nil'
236
+ end
237
+
238
+ @cwd = cwd
239
+ end
240
+
241
+ # Custom attribute writer method with validation
242
+ # @param [Object] envs Value to be assigned
243
+ def envs=(envs)
244
+ if envs.nil?
245
+ fail ArgumentError, 'envs cannot be nil'
246
+ end
247
+
248
+ @envs = envs
249
+ end
250
+
251
+ # Custom attribute writer method with validation
252
+ # @param [Object] id Value to be assigned
253
+ def id=(id)
254
+ if id.nil?
255
+ fail ArgumentError, 'id cannot be nil'
256
+ end
257
+
258
+ @id = id
259
+ end
260
+
261
+ # Custom attribute writer method with validation
262
+ # @param [Object] lazy_start Value to be assigned
263
+ def lazy_start=(lazy_start)
264
+ if lazy_start.nil?
265
+ fail ArgumentError, 'lazy_start cannot be nil'
266
+ end
267
+
268
+ @lazy_start = lazy_start
269
+ end
270
+
271
+ # Custom attribute writer method with validation
272
+ # @param [Object] rows Value to be assigned
273
+ def rows=(rows)
274
+ if rows.nil?
275
+ fail ArgumentError, 'rows cannot be nil'
276
+ end
277
+
278
+ @rows = rows
279
+ end
280
+
281
+ # Checks equality by comparing each attribute.
282
+ # @param [Object] Object to be compared
283
+ def ==(o)
284
+ return true if self.equal?(o)
285
+ self.class == o.class &&
286
+ active == o.active &&
287
+ cols == o.cols &&
288
+ created_at == o.created_at &&
289
+ cwd == o.cwd &&
290
+ envs == o.envs &&
291
+ id == o.id &&
292
+ lazy_start == o.lazy_start &&
293
+ rows == o.rows
294
+ end
295
+
296
+ # @see the `==` method
297
+ # @param [Object] Object to be compared
298
+ def eql?(o)
299
+ self == o
300
+ end
301
+
302
+ # Calculates hash code according to all attributes.
303
+ # @return [Integer] Hash code
304
+ def hash
305
+ [active, cols, created_at, cwd, envs, id, lazy_start, rows].hash
306
+ end
307
+
308
+ # Builds the object from hash
309
+ # @param [Hash] attributes Model attributes in the form of hash
310
+ # @return [Object] Returns the model itself
311
+ def self.build_from_hash(attributes)
312
+ return nil unless attributes.is_a?(Hash)
313
+ attributes = attributes.transform_keys(&:to_sym)
314
+ transformed_hash = {}
315
+ openapi_types.each_pair do |key, type|
316
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
317
+ transformed_hash["#{key}"] = nil
318
+ elsif type =~ /\AArray<(.*)>/i
319
+ # check to ensure the input is an array given that the attribute
320
+ # is documented as an array but the input is not
321
+ if attributes[attribute_map[key]].is_a?(Array)
322
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
323
+ end
324
+ elsif !attributes[attribute_map[key]].nil?
325
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
326
+ end
327
+ end
328
+ new(transformed_hash)
329
+ end
330
+
331
+ # Returns the object in the form of hash
332
+ # @return [Hash] Returns the object in the form of hash
333
+ def to_hash
334
+ hash = {}
335
+ self.class.attribute_map.each_pair do |attr, param|
336
+ value = self.send(attr)
337
+ if value.nil?
338
+ is_nullable = self.class.openapi_nullable.include?(attr)
339
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
340
+ end
341
+
342
+ hash[param] = _to_hash(value)
343
+ end
344
+ hash
345
+ end
346
+
347
+ end
348
+
349
+ end