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.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +0 -68
- data/lib/daytona_api_client/version.rb +1 -1
- data/lib/daytona_api_client.rb +0 -68
- metadata +1 -69
- data/lib/daytona_api_client/api/toolbox_api.rb +0 -5108
- data/lib/daytona_api_client/models/command.rb +0 -202
- data/lib/daytona_api_client/models/completion_context.rb +0 -173
- data/lib/daytona_api_client/models/completion_item.rb +0 -218
- data/lib/daytona_api_client/models/completion_list.rb +0 -192
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +0 -185
- data/lib/daytona_api_client/models/computer_use_start_response.rb +0 -192
- data/lib/daytona_api_client/models/computer_use_status_response.rb +0 -189
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +0 -192
- data/lib/daytona_api_client/models/create_session_request.rb +0 -165
- data/lib/daytona_api_client/models/display_info_response.rb +0 -167
- data/lib/daytona_api_client/models/download_files.rb +0 -167
- data/lib/daytona_api_client/models/execute_request.rb +0 -184
- data/lib/daytona_api_client/models/execute_response.rb +0 -192
- data/lib/daytona_api_client/models/file_info.rb +0 -346
- data/lib/daytona_api_client/models/file_status.rb +0 -242
- data/lib/daytona_api_client/models/git_add_request.rb +0 -193
- data/lib/daytona_api_client/models/git_branch_request.rb +0 -190
- data/lib/daytona_api_client/models/git_checkout_request.rb +0 -190
- data/lib/daytona_api_client/models/git_clone_request.rb +0 -226
- data/lib/daytona_api_client/models/git_commit_info.rb +0 -268
- data/lib/daytona_api_client/models/git_commit_request.rb +0 -254
- data/lib/daytona_api_client/models/git_commit_response.rb +0 -164
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +0 -190
- data/lib/daytona_api_client/models/git_repo_request.rb +0 -182
- data/lib/daytona_api_client/models/git_status.rb +0 -219
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +0 -165
- data/lib/daytona_api_client/models/keyboard_press_request.rb +0 -177
- data/lib/daytona_api_client/models/keyboard_type_request.rb +0 -175
- data/lib/daytona_api_client/models/list_branch_response.rb +0 -166
- data/lib/daytona_api_client/models/lsp_completion_params.rb +0 -254
- data/lib/daytona_api_client/models/lsp_document_request.rb +0 -219
- data/lib/daytona_api_client/models/lsp_location.rb +0 -190
- data/lib/daytona_api_client/models/lsp_server_request.rb +0 -192
- data/lib/daytona_api_client/models/lsp_symbol.rb +0 -216
- data/lib/daytona_api_client/models/match.rb +0 -216
- data/lib/daytona_api_client/models/mouse_click_request.rb +0 -212
- data/lib/daytona_api_client/models/mouse_click_response.rb +0 -192
- data/lib/daytona_api_client/models/mouse_drag_request.rb +0 -256
- data/lib/daytona_api_client/models/mouse_drag_response.rb +0 -192
- data/lib/daytona_api_client/models/mouse_move_request.rb +0 -192
- data/lib/daytona_api_client/models/mouse_move_response.rb +0 -192
- data/lib/daytona_api_client/models/mouse_position.rb +0 -192
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +0 -229
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +0 -165
- data/lib/daytona_api_client/models/position.rb +0 -190
- data/lib/daytona_api_client/models/process_errors_response.rb +0 -192
- data/lib/daytona_api_client/models/process_logs_response.rb +0 -192
- data/lib/daytona_api_client/models/process_restart_response.rb +0 -192
- data/lib/daytona_api_client/models/process_status_response.rb +0 -192
- data/lib/daytona_api_client/models/project_dir_response.rb +0 -147
- data/lib/daytona_api_client/models/pty_create_request.rb +0 -217
- data/lib/daytona_api_client/models/pty_create_response.rb +0 -165
- data/lib/daytona_api_client/models/pty_list_response.rb +0 -167
- data/lib/daytona_api_client/models/pty_resize_request.rb +0 -192
- data/lib/daytona_api_client/models/pty_session_info.rb +0 -354
- data/lib/daytona_api_client/models/range.rb +0 -190
- data/lib/daytona_api_client/models/region_screenshot_response.rb +0 -185
- data/lib/daytona_api_client/models/replace_request.rb +0 -218
- data/lib/daytona_api_client/models/replace_result.rb +0 -165
- data/lib/daytona_api_client/models/screenshot_response.rb +0 -185
- data/lib/daytona_api_client/models/search_files_response.rb +0 -166
- data/lib/daytona_api_client/models/session.rb +0 -180
- data/lib/daytona_api_client/models/session_execute_request.rb +0 -185
- data/lib/daytona_api_client/models/session_execute_response.rb +0 -168
- data/lib/daytona_api_client/models/user_home_dir_response.rb +0 -147
- data/lib/daytona_api_client/models/windows_response.rb +0 -194
- 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 Range < ApiModelBase
|
|
18
|
-
attr_accessor :start
|
|
19
|
-
|
|
20
|
-
attr_accessor :_end
|
|
21
|
-
|
|
22
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
-
def self.attribute_map
|
|
24
|
-
{
|
|
25
|
-
:'start' => :'start',
|
|
26
|
-
:'_end' => :'end'
|
|
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
|
-
:'start' => :'Position',
|
|
44
|
-
:'_end' => :'Position'
|
|
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::Range` 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::Range`. 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?(:'start')
|
|
71
|
-
self.start = attributes[:'start']
|
|
72
|
-
else
|
|
73
|
-
self.start = nil
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
if attributes.key?(:'_end')
|
|
77
|
-
self._end = attributes[:'_end']
|
|
78
|
-
else
|
|
79
|
-
self._end = 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 @start.nil?
|
|
89
|
-
invalid_properties.push('invalid value for "start", start cannot be nil.')
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
if @_end.nil?
|
|
93
|
-
invalid_properties.push('invalid value for "_end", _end 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 @start.nil?
|
|
104
|
-
return false if @_end.nil?
|
|
105
|
-
true
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
# Custom attribute writer method with validation
|
|
109
|
-
# @param [Object] start Value to be assigned
|
|
110
|
-
def start=(start)
|
|
111
|
-
if start.nil?
|
|
112
|
-
fail ArgumentError, 'start cannot be nil'
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
@start = start
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
# Custom attribute writer method with validation
|
|
119
|
-
# @param [Object] _end Value to be assigned
|
|
120
|
-
def _end=(_end)
|
|
121
|
-
if _end.nil?
|
|
122
|
-
fail ArgumentError, '_end cannot be nil'
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
@_end = _end
|
|
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
|
-
start == o.start &&
|
|
134
|
-
_end == o._end
|
|
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
|
-
[start, _end].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,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 RegionScreenshotResponse < ApiModelBase
|
|
18
|
-
# Base64 encoded screenshot image data of the specified region
|
|
19
|
-
attr_accessor :screenshot
|
|
20
|
-
|
|
21
|
-
# The current cursor position when the region screenshot was taken
|
|
22
|
-
attr_accessor :cursor_position
|
|
23
|
-
|
|
24
|
-
# The size of the screenshot data in bytes
|
|
25
|
-
attr_accessor :size_bytes
|
|
26
|
-
|
|
27
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
-
def self.attribute_map
|
|
29
|
-
{
|
|
30
|
-
:'screenshot' => :'screenshot',
|
|
31
|
-
:'cursor_position' => :'cursorPosition',
|
|
32
|
-
:'size_bytes' => :'sizeBytes'
|
|
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
|
-
:'screenshot' => :'String',
|
|
50
|
-
:'cursor_position' => :'Object',
|
|
51
|
-
:'size_bytes' => :'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::RegionScreenshotResponse` 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::RegionScreenshotResponse`. 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?(:'screenshot')
|
|
78
|
-
self.screenshot = attributes[:'screenshot']
|
|
79
|
-
else
|
|
80
|
-
self.screenshot = nil
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
if attributes.key?(:'cursor_position')
|
|
84
|
-
self.cursor_position = attributes[:'cursor_position']
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
if attributes.key?(:'size_bytes')
|
|
88
|
-
self.size_bytes = attributes[:'size_bytes']
|
|
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 @screenshot.nil?
|
|
98
|
-
invalid_properties.push('invalid value for "screenshot", screenshot 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 @screenshot.nil?
|
|
109
|
-
true
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
# Custom attribute writer method with validation
|
|
113
|
-
# @param [Object] screenshot Value to be assigned
|
|
114
|
-
def screenshot=(screenshot)
|
|
115
|
-
if screenshot.nil?
|
|
116
|
-
fail ArgumentError, 'screenshot cannot be nil'
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
@screenshot = screenshot
|
|
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
|
-
screenshot == o.screenshot &&
|
|
128
|
-
cursor_position == o.cursor_position &&
|
|
129
|
-
size_bytes == o.size_bytes
|
|
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
|
-
[screenshot, cursor_position, size_bytes].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,218 +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 ReplaceRequest < ApiModelBase
|
|
18
|
-
attr_accessor :files
|
|
19
|
-
|
|
20
|
-
attr_accessor :pattern
|
|
21
|
-
|
|
22
|
-
attr_accessor :new_value
|
|
23
|
-
|
|
24
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
-
def self.attribute_map
|
|
26
|
-
{
|
|
27
|
-
:'files' => :'files',
|
|
28
|
-
:'pattern' => :'pattern',
|
|
29
|
-
:'new_value' => :'newValue'
|
|
30
|
-
}
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# Returns attribute mapping this model knows about
|
|
34
|
-
def self.acceptable_attribute_map
|
|
35
|
-
attribute_map
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
# Returns all the JSON keys this model knows about
|
|
39
|
-
def self.acceptable_attributes
|
|
40
|
-
acceptable_attribute_map.values
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# Attribute type mapping.
|
|
44
|
-
def self.openapi_types
|
|
45
|
-
{
|
|
46
|
-
:'files' => :'Array<String>',
|
|
47
|
-
:'pattern' => :'String',
|
|
48
|
-
:'new_value' => :'String'
|
|
49
|
-
}
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# List of attributes with nullable: true
|
|
53
|
-
def self.openapi_nullable
|
|
54
|
-
Set.new([
|
|
55
|
-
])
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
# Initializes the object
|
|
59
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
-
def initialize(attributes = {})
|
|
61
|
-
if (!attributes.is_a?(Hash))
|
|
62
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::ReplaceRequest` initialize method"
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::ReplaceRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
|
-
end
|
|
71
|
-
h[k.to_sym] = v
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if attributes.key?(:'files')
|
|
75
|
-
if (value = attributes[:'files']).is_a?(Array)
|
|
76
|
-
self.files = value
|
|
77
|
-
end
|
|
78
|
-
else
|
|
79
|
-
self.files = nil
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
if attributes.key?(:'pattern')
|
|
83
|
-
self.pattern = attributes[:'pattern']
|
|
84
|
-
else
|
|
85
|
-
self.pattern = nil
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
if attributes.key?(:'new_value')
|
|
89
|
-
self.new_value = attributes[:'new_value']
|
|
90
|
-
else
|
|
91
|
-
self.new_value = nil
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
-
# @return Array for valid properties with the reasons
|
|
97
|
-
def list_invalid_properties
|
|
98
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
|
-
invalid_properties = Array.new
|
|
100
|
-
if @files.nil?
|
|
101
|
-
invalid_properties.push('invalid value for "files", files cannot be nil.')
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
if @pattern.nil?
|
|
105
|
-
invalid_properties.push('invalid value for "pattern", pattern cannot be nil.')
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
if @new_value.nil?
|
|
109
|
-
invalid_properties.push('invalid value for "new_value", new_value cannot be nil.')
|
|
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 @files.nil?
|
|
120
|
-
return false if @pattern.nil?
|
|
121
|
-
return false if @new_value.nil?
|
|
122
|
-
true
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
# Custom attribute writer method with validation
|
|
126
|
-
# @param [Object] files Value to be assigned
|
|
127
|
-
def files=(files)
|
|
128
|
-
if files.nil?
|
|
129
|
-
fail ArgumentError, 'files cannot be nil'
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
@files = files
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
# Custom attribute writer method with validation
|
|
136
|
-
# @param [Object] pattern Value to be assigned
|
|
137
|
-
def pattern=(pattern)
|
|
138
|
-
if pattern.nil?
|
|
139
|
-
fail ArgumentError, 'pattern cannot be nil'
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
@pattern = pattern
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
# Custom attribute writer method with validation
|
|
146
|
-
# @param [Object] new_value Value to be assigned
|
|
147
|
-
def new_value=(new_value)
|
|
148
|
-
if new_value.nil?
|
|
149
|
-
fail ArgumentError, 'new_value cannot be nil'
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
@new_value = new_value
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
# Checks equality by comparing each attribute.
|
|
156
|
-
# @param [Object] Object to be compared
|
|
157
|
-
def ==(o)
|
|
158
|
-
return true if self.equal?(o)
|
|
159
|
-
self.class == o.class &&
|
|
160
|
-
files == o.files &&
|
|
161
|
-
pattern == o.pattern &&
|
|
162
|
-
new_value == o.new_value
|
|
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
|
-
[files, pattern, new_value].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
|