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