daytona_api_client 0.197.0 → 0.198.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 (73) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +0 -68
  3. data/lib/daytona_api_client/version.rb +1 -1
  4. data/lib/daytona_api_client.rb +0 -68
  5. metadata +1 -69
  6. data/lib/daytona_api_client/api/toolbox_api.rb +0 -5108
  7. data/lib/daytona_api_client/models/command.rb +0 -202
  8. data/lib/daytona_api_client/models/completion_context.rb +0 -173
  9. data/lib/daytona_api_client/models/completion_item.rb +0 -218
  10. data/lib/daytona_api_client/models/completion_list.rb +0 -192
  11. data/lib/daytona_api_client/models/compressed_screenshot_response.rb +0 -185
  12. data/lib/daytona_api_client/models/computer_use_start_response.rb +0 -192
  13. data/lib/daytona_api_client/models/computer_use_status_response.rb +0 -189
  14. data/lib/daytona_api_client/models/computer_use_stop_response.rb +0 -192
  15. data/lib/daytona_api_client/models/create_session_request.rb +0 -165
  16. data/lib/daytona_api_client/models/display_info_response.rb +0 -167
  17. data/lib/daytona_api_client/models/download_files.rb +0 -167
  18. data/lib/daytona_api_client/models/execute_request.rb +0 -184
  19. data/lib/daytona_api_client/models/execute_response.rb +0 -192
  20. data/lib/daytona_api_client/models/file_info.rb +0 -346
  21. data/lib/daytona_api_client/models/file_status.rb +0 -242
  22. data/lib/daytona_api_client/models/git_add_request.rb +0 -193
  23. data/lib/daytona_api_client/models/git_branch_request.rb +0 -190
  24. data/lib/daytona_api_client/models/git_checkout_request.rb +0 -190
  25. data/lib/daytona_api_client/models/git_clone_request.rb +0 -226
  26. data/lib/daytona_api_client/models/git_commit_info.rb +0 -268
  27. data/lib/daytona_api_client/models/git_commit_request.rb +0 -254
  28. data/lib/daytona_api_client/models/git_commit_response.rb +0 -164
  29. data/lib/daytona_api_client/models/git_delete_branch_request.rb +0 -190
  30. data/lib/daytona_api_client/models/git_repo_request.rb +0 -182
  31. data/lib/daytona_api_client/models/git_status.rb +0 -219
  32. data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +0 -165
  33. data/lib/daytona_api_client/models/keyboard_press_request.rb +0 -177
  34. data/lib/daytona_api_client/models/keyboard_type_request.rb +0 -175
  35. data/lib/daytona_api_client/models/list_branch_response.rb +0 -166
  36. data/lib/daytona_api_client/models/lsp_completion_params.rb +0 -254
  37. data/lib/daytona_api_client/models/lsp_document_request.rb +0 -219
  38. data/lib/daytona_api_client/models/lsp_location.rb +0 -190
  39. data/lib/daytona_api_client/models/lsp_server_request.rb +0 -192
  40. data/lib/daytona_api_client/models/lsp_symbol.rb +0 -216
  41. data/lib/daytona_api_client/models/match.rb +0 -216
  42. data/lib/daytona_api_client/models/mouse_click_request.rb +0 -212
  43. data/lib/daytona_api_client/models/mouse_click_response.rb +0 -192
  44. data/lib/daytona_api_client/models/mouse_drag_request.rb +0 -256
  45. data/lib/daytona_api_client/models/mouse_drag_response.rb +0 -192
  46. data/lib/daytona_api_client/models/mouse_move_request.rb +0 -192
  47. data/lib/daytona_api_client/models/mouse_move_response.rb +0 -192
  48. data/lib/daytona_api_client/models/mouse_position.rb +0 -192
  49. data/lib/daytona_api_client/models/mouse_scroll_request.rb +0 -229
  50. data/lib/daytona_api_client/models/mouse_scroll_response.rb +0 -165
  51. data/lib/daytona_api_client/models/position.rb +0 -190
  52. data/lib/daytona_api_client/models/process_errors_response.rb +0 -192
  53. data/lib/daytona_api_client/models/process_logs_response.rb +0 -192
  54. data/lib/daytona_api_client/models/process_restart_response.rb +0 -192
  55. data/lib/daytona_api_client/models/process_status_response.rb +0 -192
  56. data/lib/daytona_api_client/models/project_dir_response.rb +0 -147
  57. data/lib/daytona_api_client/models/pty_create_request.rb +0 -217
  58. data/lib/daytona_api_client/models/pty_create_response.rb +0 -165
  59. data/lib/daytona_api_client/models/pty_list_response.rb +0 -167
  60. data/lib/daytona_api_client/models/pty_resize_request.rb +0 -192
  61. data/lib/daytona_api_client/models/pty_session_info.rb +0 -354
  62. data/lib/daytona_api_client/models/range.rb +0 -190
  63. data/lib/daytona_api_client/models/region_screenshot_response.rb +0 -185
  64. data/lib/daytona_api_client/models/replace_request.rb +0 -218
  65. data/lib/daytona_api_client/models/replace_result.rb +0 -165
  66. data/lib/daytona_api_client/models/screenshot_response.rb +0 -185
  67. data/lib/daytona_api_client/models/search_files_response.rb +0 -166
  68. data/lib/daytona_api_client/models/session.rb +0 -180
  69. data/lib/daytona_api_client/models/session_execute_request.rb +0 -185
  70. data/lib/daytona_api_client/models/session_execute_response.rb +0 -168
  71. data/lib/daytona_api_client/models/user_home_dir_response.rb +0 -147
  72. data/lib/daytona_api_client/models/windows_response.rb +0 -194
  73. data/lib/daytona_api_client/models/work_dir_response.rb +0 -147
@@ -1,185 +0,0 @@
1
- =begin
2
- #Daytona
3
-
4
- #Daytona AI platform API Docs
5
-
6
- The version of the OpenAPI document: 1.0
7
- Contact: support@daytona.com
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 DaytonaApiClient
17
- class SessionExecuteRequest < ApiModelBase
18
- # The command to execute
19
- attr_accessor :command
20
-
21
- # Whether to execute the command asynchronously
22
- attr_accessor :run_async
23
-
24
- # Deprecated: Use runAsync instead. Whether to execute the command asynchronously
25
- attr_accessor :async
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'command' => :'command',
31
- :'run_async' => :'runAsync',
32
- :'async' => :'async'
33
- }
34
- end
35
-
36
- # Returns attribute mapping this model knows about
37
- def self.acceptable_attribute_map
38
- attribute_map
39
- end
40
-
41
- # Returns all the JSON keys this model knows about
42
- def self.acceptable_attributes
43
- acceptable_attribute_map.values
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.openapi_types
48
- {
49
- :'command' => :'String',
50
- :'run_async' => :'Boolean',
51
- :'async' => :'Boolean'
52
- }
53
- end
54
-
55
- # List of attributes with nullable: true
56
- def self.openapi_nullable
57
- Set.new([
58
- ])
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::SessionExecuteRequest` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- acceptable_attribute_map = self.class.acceptable_attribute_map
70
- attributes = attributes.each_with_object({}) { |(k, v), h|
71
- if (!acceptable_attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::SessionExecuteRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
- end
74
- h[k.to_sym] = v
75
- }
76
-
77
- if attributes.key?(:'command')
78
- self.command = attributes[:'command']
79
- else
80
- self.command = nil
81
- end
82
-
83
- if attributes.key?(:'run_async')
84
- self.run_async = attributes[:'run_async']
85
- end
86
-
87
- if attributes.key?(:'async')
88
- self.async = attributes[:'async']
89
- end
90
- end
91
-
92
- # Show invalid properties with the reasons. Usually used together with valid?
93
- # @return Array for valid properties with the reasons
94
- def list_invalid_properties
95
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
96
- invalid_properties = Array.new
97
- if @command.nil?
98
- invalid_properties.push('invalid value for "command", command cannot be nil.')
99
- end
100
-
101
- invalid_properties
102
- end
103
-
104
- # Check to see if the all the properties in the model are valid
105
- # @return true if the model is valid
106
- def valid?
107
- warn '[DEPRECATED] the `valid?` method is obsolete'
108
- return false if @command.nil?
109
- true
110
- end
111
-
112
- # Custom attribute writer method with validation
113
- # @param [Object] command Value to be assigned
114
- def command=(command)
115
- if command.nil?
116
- fail ArgumentError, 'command cannot be nil'
117
- end
118
-
119
- @command = command
120
- end
121
-
122
- # Checks equality by comparing each attribute.
123
- # @param [Object] Object to be compared
124
- def ==(o)
125
- return true if self.equal?(o)
126
- self.class == o.class &&
127
- command == o.command &&
128
- run_async == o.run_async &&
129
- async == o.async
130
- end
131
-
132
- # @see the `==` method
133
- # @param [Object] Object to be compared
134
- def eql?(o)
135
- self == o
136
- end
137
-
138
- # Calculates hash code according to all attributes.
139
- # @return [Integer] Hash code
140
- def hash
141
- [command, run_async, async].hash
142
- end
143
-
144
- # Builds the object from hash
145
- # @param [Hash] attributes Model attributes in the form of hash
146
- # @return [Object] Returns the model itself
147
- def self.build_from_hash(attributes)
148
- return nil unless attributes.is_a?(Hash)
149
- attributes = attributes.transform_keys(&:to_sym)
150
- transformed_hash = {}
151
- openapi_types.each_pair do |key, type|
152
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
153
- transformed_hash["#{key}"] = nil
154
- elsif type =~ /\AArray<(.*)>/i
155
- # check to ensure the input is an array given that the attribute
156
- # is documented as an array but the input is not
157
- if attributes[attribute_map[key]].is_a?(Array)
158
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
159
- end
160
- elsif !attributes[attribute_map[key]].nil?
161
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
162
- end
163
- end
164
- new(transformed_hash)
165
- end
166
-
167
- # Returns the object in the form of hash
168
- # @return [Hash] Returns the object in the form of hash
169
- def to_hash
170
- hash = {}
171
- self.class.attribute_map.each_pair do |attr, param|
172
- value = self.send(attr)
173
- if value.nil?
174
- is_nullable = self.class.openapi_nullable.include?(attr)
175
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
176
- end
177
-
178
- hash[param] = _to_hash(value)
179
- end
180
- hash
181
- end
182
-
183
- end
184
-
185
- end
@@ -1,168 +0,0 @@
1
- =begin
2
- #Daytona
3
-
4
- #Daytona AI platform API Docs
5
-
6
- The version of the OpenAPI document: 1.0
7
- Contact: support@daytona.com
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 DaytonaApiClient
17
- class SessionExecuteResponse < ApiModelBase
18
- # The ID of the executed command
19
- attr_accessor :cmd_id
20
-
21
- # The output of the executed command marked with stdout and stderr prefixes
22
- attr_accessor :output
23
-
24
- # The exit code of the executed command
25
- attr_accessor :exit_code
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'cmd_id' => :'cmdId',
31
- :'output' => :'output',
32
- :'exit_code' => :'exitCode'
33
- }
34
- end
35
-
36
- # Returns attribute mapping this model knows about
37
- def self.acceptable_attribute_map
38
- attribute_map
39
- end
40
-
41
- # Returns all the JSON keys this model knows about
42
- def self.acceptable_attributes
43
- acceptable_attribute_map.values
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.openapi_types
48
- {
49
- :'cmd_id' => :'String',
50
- :'output' => :'String',
51
- :'exit_code' => :'Float'
52
- }
53
- end
54
-
55
- # List of attributes with nullable: true
56
- def self.openapi_nullable
57
- Set.new([
58
- ])
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::SessionExecuteResponse` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- acceptable_attribute_map = self.class.acceptable_attribute_map
70
- attributes = attributes.each_with_object({}) { |(k, v), h|
71
- if (!acceptable_attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::SessionExecuteResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
- end
74
- h[k.to_sym] = v
75
- }
76
-
77
- if attributes.key?(:'cmd_id')
78
- self.cmd_id = attributes[:'cmd_id']
79
- end
80
-
81
- if attributes.key?(:'output')
82
- self.output = attributes[:'output']
83
- end
84
-
85
- if attributes.key?(:'exit_code')
86
- self.exit_code = attributes[:'exit_code']
87
- end
88
- end
89
-
90
- # Show invalid properties with the reasons. Usually used together with valid?
91
- # @return Array for valid properties with the reasons
92
- def list_invalid_properties
93
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
- invalid_properties = Array.new
95
- invalid_properties
96
- end
97
-
98
- # Check to see if the all the properties in the model are valid
99
- # @return true if the model is valid
100
- def valid?
101
- warn '[DEPRECATED] the `valid?` method is obsolete'
102
- true
103
- end
104
-
105
- # Checks equality by comparing each attribute.
106
- # @param [Object] Object to be compared
107
- def ==(o)
108
- return true if self.equal?(o)
109
- self.class == o.class &&
110
- cmd_id == o.cmd_id &&
111
- output == o.output &&
112
- exit_code == o.exit_code
113
- end
114
-
115
- # @see the `==` method
116
- # @param [Object] Object to be compared
117
- def eql?(o)
118
- self == o
119
- end
120
-
121
- # Calculates hash code according to all attributes.
122
- # @return [Integer] Hash code
123
- def hash
124
- [cmd_id, output, exit_code].hash
125
- end
126
-
127
- # Builds the object from hash
128
- # @param [Hash] attributes Model attributes in the form of hash
129
- # @return [Object] Returns the model itself
130
- def self.build_from_hash(attributes)
131
- return nil unless attributes.is_a?(Hash)
132
- attributes = attributes.transform_keys(&:to_sym)
133
- transformed_hash = {}
134
- openapi_types.each_pair do |key, type|
135
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
- transformed_hash["#{key}"] = nil
137
- elsif type =~ /\AArray<(.*)>/i
138
- # check to ensure the input is an array given that the attribute
139
- # is documented as an array but the input is not
140
- if attributes[attribute_map[key]].is_a?(Array)
141
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
- end
143
- elsif !attributes[attribute_map[key]].nil?
144
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
- end
146
- end
147
- new(transformed_hash)
148
- end
149
-
150
- # Returns the object in the form of hash
151
- # @return [Hash] Returns the object in the form of hash
152
- def to_hash
153
- hash = {}
154
- self.class.attribute_map.each_pair do |attr, param|
155
- value = self.send(attr)
156
- if value.nil?
157
- is_nullable = self.class.openapi_nullable.include?(attr)
158
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
159
- end
160
-
161
- hash[param] = _to_hash(value)
162
- end
163
- hash
164
- end
165
-
166
- end
167
-
168
- end
@@ -1,147 +0,0 @@
1
- =begin
2
- #Daytona
3
-
4
- #Daytona AI platform API Docs
5
-
6
- The version of the OpenAPI document: 1.0
7
- Contact: support@daytona.com
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 DaytonaApiClient
17
- class UserHomeDirResponse < ApiModelBase
18
- attr_accessor :dir
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :'dir' => :'dir'
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
- :'dir' => :'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 `DaytonaApiClient::UserHomeDirResponse` 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 `DaytonaApiClient::UserHomeDirResponse`. 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?(:'dir')
67
- self.dir = attributes[:'dir']
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
- dir == o.dir
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
- [dir].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
@@ -1,194 +0,0 @@
1
- =begin
2
- #Daytona
3
-
4
- #Daytona AI platform API Docs
5
-
6
- The version of the OpenAPI document: 1.0
7
- Contact: support@daytona.com
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 DaytonaApiClient
17
- class WindowsResponse < ApiModelBase
18
- # Array of window information for all visible windows
19
- attr_accessor :windows
20
-
21
- # The total number of windows found
22
- attr_accessor :count
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'windows' => :'windows',
28
- :'count' => :'count'
29
- }
30
- end
31
-
32
- # Returns attribute mapping this model knows about
33
- def self.acceptable_attribute_map
34
- attribute_map
35
- end
36
-
37
- # Returns all the JSON keys this model knows about
38
- def self.acceptable_attributes
39
- acceptable_attribute_map.values
40
- end
41
-
42
- # Attribute type mapping.
43
- def self.openapi_types
44
- {
45
- :'windows' => :'Array<Object>',
46
- :'count' => :'Float'
47
- }
48
- end
49
-
50
- # List of attributes with nullable: true
51
- def self.openapi_nullable
52
- Set.new([
53
- ])
54
- end
55
-
56
- # Initializes the object
57
- # @param [Hash] attributes Model attributes in the form of hash
58
- def initialize(attributes = {})
59
- if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::WindowsResponse` initialize method"
61
- end
62
-
63
- # check to see if the attribute exists and convert string to symbol for hash key
64
- acceptable_attribute_map = self.class.acceptable_attribute_map
65
- attributes = attributes.each_with_object({}) { |(k, v), h|
66
- if (!acceptable_attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::WindowsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
- end
69
- h[k.to_sym] = v
70
- }
71
-
72
- if attributes.key?(:'windows')
73
- if (value = attributes[:'windows']).is_a?(Array)
74
- self.windows = value
75
- end
76
- else
77
- self.windows = nil
78
- end
79
-
80
- if attributes.key?(:'count')
81
- self.count = attributes[:'count']
82
- else
83
- self.count = nil
84
- end
85
- end
86
-
87
- # Show invalid properties with the reasons. Usually used together with valid?
88
- # @return Array for valid properties with the reasons
89
- def list_invalid_properties
90
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
- invalid_properties = Array.new
92
- if @windows.nil?
93
- invalid_properties.push('invalid value for "windows", windows cannot be nil.')
94
- end
95
-
96
- if @count.nil?
97
- invalid_properties.push('invalid value for "count", count cannot be nil.')
98
- end
99
-
100
- invalid_properties
101
- end
102
-
103
- # Check to see if the all the properties in the model are valid
104
- # @return true if the model is valid
105
- def valid?
106
- warn '[DEPRECATED] the `valid?` method is obsolete'
107
- return false if @windows.nil?
108
- return false if @count.nil?
109
- true
110
- end
111
-
112
- # Custom attribute writer method with validation
113
- # @param [Object] windows Value to be assigned
114
- def windows=(windows)
115
- if windows.nil?
116
- fail ArgumentError, 'windows cannot be nil'
117
- end
118
-
119
- @windows = windows
120
- end
121
-
122
- # Custom attribute writer method with validation
123
- # @param [Object] count Value to be assigned
124
- def count=(count)
125
- if count.nil?
126
- fail ArgumentError, 'count cannot be nil'
127
- end
128
-
129
- @count = count
130
- end
131
-
132
- # Checks equality by comparing each attribute.
133
- # @param [Object] Object to be compared
134
- def ==(o)
135
- return true if self.equal?(o)
136
- self.class == o.class &&
137
- windows == o.windows &&
138
- count == o.count
139
- end
140
-
141
- # @see the `==` method
142
- # @param [Object] Object to be compared
143
- def eql?(o)
144
- self == o
145
- end
146
-
147
- # Calculates hash code according to all attributes.
148
- # @return [Integer] Hash code
149
- def hash
150
- [windows, count].hash
151
- end
152
-
153
- # Builds the object from hash
154
- # @param [Hash] attributes Model attributes in the form of hash
155
- # @return [Object] Returns the model itself
156
- def self.build_from_hash(attributes)
157
- return nil unless attributes.is_a?(Hash)
158
- attributes = attributes.transform_keys(&:to_sym)
159
- transformed_hash = {}
160
- openapi_types.each_pair do |key, type|
161
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
162
- transformed_hash["#{key}"] = nil
163
- elsif type =~ /\AArray<(.*)>/i
164
- # check to ensure the input is an array given that the attribute
165
- # is documented as an array but the input is not
166
- if attributes[attribute_map[key]].is_a?(Array)
167
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
168
- end
169
- elsif !attributes[attribute_map[key]].nil?
170
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
171
- end
172
- end
173
- new(transformed_hash)
174
- end
175
-
176
- # Returns the object in the form of hash
177
- # @return [Hash] Returns the object in the form of hash
178
- def to_hash
179
- hash = {}
180
- self.class.attribute_map.each_pair do |attr, param|
181
- value = self.send(attr)
182
- if value.nil?
183
- is_nullable = self.class.openapi_nullable.include?(attr)
184
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
185
- end
186
-
187
- hash[param] = _to_hash(value)
188
- end
189
- hash
190
- end
191
-
192
- end
193
-
194
- end