SwaggerStableDiffusionWebui 1.0.394ffa7b0a7fff3ec484bcd084e673a8b301ccc8

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 (51) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +150 -0
  4. data/Rakefile +10 -0
  5. data/SwaggerStableDiffusionWebui.gemspec +38 -0
  6. data/docs/BodyDetectControlnetDetectPost.md +26 -0
  7. data/docs/DefaultApi.md +3127 -0
  8. data/docs/Estimation.md +30 -0
  9. data/docs/HTTPValidationError.md +18 -0
  10. data/docs/LocationInner.md +15 -0
  11. data/docs/PredictBody.md +30 -0
  12. data/docs/ProgressRequest.md +20 -0
  13. data/docs/ProgressResponse.md +32 -0
  14. data/docs/QuicksettingsHint.md +20 -0
  15. data/docs/Request.md +15 -0
  16. data/docs/ResetBody.md +20 -0
  17. data/docs/ValidationError.md +22 -0
  18. data/git_push.sh +57 -0
  19. data/lib/SwaggerStableDiffusionWebui/api/default_api.rb +3027 -0
  20. data/lib/SwaggerStableDiffusionWebui/api_client.rb +391 -0
  21. data/lib/SwaggerStableDiffusionWebui/api_error.rb +58 -0
  22. data/lib/SwaggerStableDiffusionWebui/configuration.rb +288 -0
  23. data/lib/SwaggerStableDiffusionWebui/models/body_detect_controlnet_detect_post.rb +265 -0
  24. data/lib/SwaggerStableDiffusionWebui/models/estimation.rb +285 -0
  25. data/lib/SwaggerStableDiffusionWebui/models/http_validation_error.rb +221 -0
  26. data/lib/SwaggerStableDiffusionWebui/models/location_inner.rb +230 -0
  27. data/lib/SwaggerStableDiffusionWebui/models/predict_body.rb +283 -0
  28. data/lib/SwaggerStableDiffusionWebui/models/progress_request.rb +232 -0
  29. data/lib/SwaggerStableDiffusionWebui/models/progress_response.rb +301 -0
  30. data/lib/SwaggerStableDiffusionWebui/models/quicksettings_hint.rb +238 -0
  31. data/lib/SwaggerStableDiffusionWebui/models/request.rb +230 -0
  32. data/lib/SwaggerStableDiffusionWebui/models/reset_body.rb +238 -0
  33. data/lib/SwaggerStableDiffusionWebui/models/validation_error.rb +254 -0
  34. data/lib/SwaggerStableDiffusionWebui/version.rb +15 -0
  35. data/lib/SwaggerStableDiffusionWebui.rb +51 -0
  36. data/spec/api/default_api_spec.rb +574 -0
  37. data/spec/api_client_spec.rb +228 -0
  38. data/spec/configuration_spec.rb +42 -0
  39. data/spec/models/body_detect_controlnet_detect_post_spec.rb +58 -0
  40. data/spec/models/estimation_spec.rb +70 -0
  41. data/spec/models/http_validation_error_spec.rb +34 -0
  42. data/spec/models/location_inner_spec.rb +28 -0
  43. data/spec/models/predict_body_spec.rb +70 -0
  44. data/spec/models/progress_request_spec.rb +40 -0
  45. data/spec/models/progress_response_spec.rb +76 -0
  46. data/spec/models/quicksettings_hint_spec.rb +40 -0
  47. data/spec/models/request_spec.rb +28 -0
  48. data/spec/models/reset_body_spec.rb +40 -0
  49. data/spec/models/validation_error_spec.rb +46 -0
  50. data/spec/spec_helper.rb +111 -0
  51. metadata +147 -0
@@ -0,0 +1,285 @@
1
+ =begin
2
+ #FastAPI
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SwaggerStableDiffusionWebui
17
+ class Estimation
18
+ attr_accessor :msg
19
+
20
+ attr_accessor :rank
21
+
22
+ attr_accessor :queue_size
23
+
24
+ attr_accessor :avg_event_process_time
25
+
26
+ attr_accessor :avg_event_concurrent_process_time
27
+
28
+ attr_accessor :rank_eta
29
+
30
+ attr_accessor :queue_eta
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'msg' => :'msg',
36
+ :'rank' => :'rank',
37
+ :'queue_size' => :'queue_size',
38
+ :'avg_event_process_time' => :'avg_event_process_time',
39
+ :'avg_event_concurrent_process_time' => :'avg_event_concurrent_process_time',
40
+ :'rank_eta' => :'rank_eta',
41
+ :'queue_eta' => :'queue_eta'
42
+ }
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'msg' => :'String',
54
+ :'rank' => :'Integer',
55
+ :'queue_size' => :'Integer',
56
+ :'avg_event_process_time' => :'Float',
57
+ :'avg_event_concurrent_process_time' => :'Float',
58
+ :'rank_eta' => :'Float',
59
+ :'queue_eta' => :'Float'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerStableDiffusionWebui::Estimation` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!self.class.attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerStableDiffusionWebui::Estimation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'msg')
85
+ self.msg = attributes[:'msg']
86
+ else
87
+ self.msg = 'estimation'
88
+ end
89
+
90
+ if attributes.key?(:'rank')
91
+ self.rank = attributes[:'rank']
92
+ end
93
+
94
+ if attributes.key?(:'queue_size')
95
+ self.queue_size = attributes[:'queue_size']
96
+ end
97
+
98
+ if attributes.key?(:'avg_event_process_time')
99
+ self.avg_event_process_time = attributes[:'avg_event_process_time']
100
+ end
101
+
102
+ if attributes.key?(:'avg_event_concurrent_process_time')
103
+ self.avg_event_concurrent_process_time = attributes[:'avg_event_concurrent_process_time']
104
+ end
105
+
106
+ if attributes.key?(:'rank_eta')
107
+ self.rank_eta = attributes[:'rank_eta']
108
+ end
109
+
110
+ if attributes.key?(:'queue_eta')
111
+ self.queue_eta = attributes[:'queue_eta']
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
+ invalid_properties = Array.new
119
+ if @queue_size.nil?
120
+ invalid_properties.push('invalid value for "queue_size", queue_size cannot be nil.')
121
+ end
122
+
123
+ if @queue_eta.nil?
124
+ invalid_properties.push('invalid value for "queue_eta", queue_eta cannot be nil.')
125
+ end
126
+
127
+ invalid_properties
128
+ end
129
+
130
+ # Check to see if the all the properties in the model are valid
131
+ # @return true if the model is valid
132
+ def valid?
133
+ return false if @queue_size.nil?
134
+ return false if @queue_eta.nil?
135
+ true
136
+ end
137
+
138
+ # Checks equality by comparing each attribute.
139
+ # @param [Object] Object to be compared
140
+ def ==(o)
141
+ return true if self.equal?(o)
142
+ self.class == o.class &&
143
+ msg == o.msg &&
144
+ rank == o.rank &&
145
+ queue_size == o.queue_size &&
146
+ avg_event_process_time == o.avg_event_process_time &&
147
+ avg_event_concurrent_process_time == o.avg_event_concurrent_process_time &&
148
+ rank_eta == o.rank_eta &&
149
+ queue_eta == o.queue_eta
150
+ end
151
+
152
+ # @see the `==` method
153
+ # @param [Object] Object to be compared
154
+ def eql?(o)
155
+ self == o
156
+ end
157
+
158
+ # Calculates hash code according to all attributes.
159
+ # @return [Integer] Hash code
160
+ def hash
161
+ [msg, rank, queue_size, avg_event_process_time, avg_event_concurrent_process_time, rank_eta, queue_eta].hash
162
+ end
163
+
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def self.build_from_hash(attributes)
168
+ new.build_from_hash(attributes)
169
+ end
170
+
171
+ # Builds the object from hash
172
+ # @param [Hash] attributes Model attributes in the form of hash
173
+ # @return [Object] Returns the model itself
174
+ def build_from_hash(attributes)
175
+ return nil unless attributes.is_a?(Hash)
176
+ attributes = attributes.transform_keys(&:to_sym)
177
+ self.class.openapi_types.each_pair do |key, type|
178
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
179
+ self.send("#{key}=", nil)
180
+ elsif type =~ /\AArray<(.*)>/i
181
+ # check to ensure the input is an array given that the attribute
182
+ # is documented as an array but the input is not
183
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
184
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
185
+ end
186
+ elsif !attributes[self.class.attribute_map[key]].nil?
187
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
188
+ end
189
+ end
190
+
191
+ self
192
+ end
193
+
194
+ # Deserializes the data based on type
195
+ # @param string type Data type
196
+ # @param string value Value to be deserialized
197
+ # @return [Object] Deserialized data
198
+ def _deserialize(type, value)
199
+ case type.to_sym
200
+ when :Time
201
+ Time.parse(value)
202
+ when :Date
203
+ Date.parse(value)
204
+ when :String
205
+ value.to_s
206
+ when :Integer
207
+ value.to_i
208
+ when :Float
209
+ value.to_f
210
+ when :Boolean
211
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
212
+ true
213
+ else
214
+ false
215
+ end
216
+ when :Object
217
+ # generic object (usually a Hash), return directly
218
+ value
219
+ when /\AArray<(?<inner_type>.+)>\z/
220
+ inner_type = Regexp.last_match[:inner_type]
221
+ value.map { |v| _deserialize(inner_type, v) }
222
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
223
+ k_type = Regexp.last_match[:k_type]
224
+ v_type = Regexp.last_match[:v_type]
225
+ {}.tap do |hash|
226
+ value.each do |k, v|
227
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
228
+ end
229
+ end
230
+ else # model
231
+ # models (e.g. Pet) or oneOf
232
+ klass = SwaggerStableDiffusionWebui.const_get(type)
233
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
234
+ end
235
+ end
236
+
237
+ # Returns the string representation of the object
238
+ # @return [String] String presentation of the object
239
+ def to_s
240
+ to_hash.to_s
241
+ end
242
+
243
+ # to_body is an alias to to_hash (backward compatibility)
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_body
246
+ to_hash
247
+ end
248
+
249
+ # Returns the object in the form of hash
250
+ # @return [Hash] Returns the object in the form of hash
251
+ def to_hash
252
+ hash = {}
253
+ self.class.attribute_map.each_pair do |attr, param|
254
+ value = self.send(attr)
255
+ if value.nil?
256
+ is_nullable = self.class.openapi_nullable.include?(attr)
257
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
258
+ end
259
+
260
+ hash[param] = _to_hash(value)
261
+ end
262
+ hash
263
+ end
264
+
265
+ # Outputs non-array value in the form of hash
266
+ # For object, use to_hash. Otherwise, just return the value
267
+ # @param [Object] value Any valid value
268
+ # @return [Hash] Returns the value in the form of hash
269
+ def _to_hash(value)
270
+ if value.is_a?(Array)
271
+ value.compact.map { |v| _to_hash(v) }
272
+ elsif value.is_a?(Hash)
273
+ {}.tap do |hash|
274
+ value.each { |k, v| hash[k] = _to_hash(v) }
275
+ end
276
+ elsif value.respond_to? :to_hash
277
+ value.to_hash
278
+ else
279
+ value
280
+ end
281
+ end
282
+
283
+ end
284
+
285
+ end
@@ -0,0 +1,221 @@
1
+ =begin
2
+ #FastAPI
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SwaggerStableDiffusionWebui
17
+ class HTTPValidationError
18
+ attr_accessor :detail
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'detail' => :'detail'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'detail' => :'Array<ValidationError>'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerStableDiffusionWebui::HTTPValidationError` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerStableDiffusionWebui::HTTPValidationError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'detail')
61
+ if (value = attributes[:'detail']).is_a?(Array)
62
+ self.detail = value
63
+ end
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ detail == o.detail
86
+ end
87
+
88
+ # @see the `==` method
89
+ # @param [Object] Object to be compared
90
+ def eql?(o)
91
+ self == o
92
+ end
93
+
94
+ # Calculates hash code according to all attributes.
95
+ # @return [Integer] Hash code
96
+ def hash
97
+ [detail].hash
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def self.build_from_hash(attributes)
104
+ new.build_from_hash(attributes)
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ self.class.openapi_types.each_pair do |key, type|
114
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
115
+ self.send("#{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[self.class.attribute_map[key]].is_a?(Array)
120
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
+ end
122
+ elsif !attributes[self.class.attribute_map[key]].nil?
123
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ end
125
+ end
126
+
127
+ self
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def _deserialize(type, value)
135
+ case type.to_sym
136
+ when :Time
137
+ Time.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :Boolean
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ # models (e.g. Pet) or oneOf
168
+ klass = SwaggerStableDiffusionWebui.const_get(type)
169
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map { |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+
219
+ end
220
+
221
+ end