legnext-ruby-sdk 1.0.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 (29) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +129 -0
  4. data/lib/openapi_client/api/account_management_api.rb +82 -0
  5. data/lib/openapi_client/api/image_api.rb +821 -0
  6. data/lib/openapi_client/api/video_api.rb +289 -0
  7. data/lib/openapi_client/api_client.rb +396 -0
  8. data/lib/openapi_client/api_error.rb +58 -0
  9. data/lib/openapi_client/api_model_base.rb +88 -0
  10. data/lib/openapi_client/configuration.rb +301 -0
  11. data/lib/openapi_client/models/api_v1_diffusion_post200_response.rb +205 -0
  12. data/lib/openapi_client/models/api_v1_diffusion_post200_response_config.rb +156 -0
  13. data/lib/openapi_client/models/api_v1_diffusion_post200_response_config_webhook_config.rb +156 -0
  14. data/lib/openapi_client/models/api_v1_diffusion_post200_response_meta.rb +156 -0
  15. data/lib/openapi_client/models/api_v1_diffusion_post200_response_meta_usage.rb +165 -0
  16. data/lib/openapi_client/models/api_v1_diffusion_post200_response_output.rb +168 -0
  17. data/lib/openapi_client/models/api_v1_edit_post200_response.rb +205 -0
  18. data/lib/openapi_client/models/api_v1_job_job_id_get200_response.rb +246 -0
  19. data/lib/openapi_client/models/api_v1_job_job_id_get200_response_error.rb +175 -0
  20. data/lib/openapi_client/models/api_v1_job_job_id_get200_response_meta.rb +174 -0
  21. data/lib/openapi_client/models/api_v1_job_job_id_get200_response_output.rb +177 -0
  22. data/lib/openapi_client/models/api_v1_job_job_id_get200_response_output_available_actions.rb +224 -0
  23. data/lib/openapi_client/models/api_v1_pan_post200_response.rb +205 -0
  24. data/lib/openapi_client/models/balance_response.rb +167 -0
  25. data/lib/openapi_client/models/balance_response_data.rb +208 -0
  26. data/lib/openapi_client/models/task_response.rb +206 -0
  27. data/lib/openapi_client/version.rb +15 -0
  28. data/lib/openapi_client.rb +59 -0
  29. metadata +115 -0
@@ -0,0 +1,174 @@
1
+ =begin
2
+ #Midjourney api-unofficial by Legnext.ai
3
+
4
+ ## **Legnext.ai Midjourney API: The Ultimate AI Image Generation Toolkit** Unlock the full creative potential of Midjourney directly within your applications and development workflows using the **Legnext.ai Midjourney API (Unofficial)**. This comprehensive collection offers a ready-to-integrate solution for professional image and video creation, manipulation, and high-fidelity upscaling. We provide developers with **stable, high-performance API access** to the Midjourney model. Crucially, integrating our service requires **no Midjourney account**, eliminating the hassle of managing official subscriptions or Discord interactions. Our toolkit simplifies the entire text-to-image process, supporting complex prompts, aspect ratio adjustments, and advanced style parameters. Focus on innovation while we handle the AI infrastructure. Start building scalable, visually stunning applications today with reliable access to the world’s leading generative AI model.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class ApiV1JobJobIdGet200ResponseMeta < ApiModelBase
18
+ attr_accessor :created_at
19
+
20
+ attr_accessor :started_at
21
+
22
+ attr_accessor :ended_at
23
+
24
+ attr_accessor :usage
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'created_at' => :'created_at',
30
+ :'started_at' => :'started_at',
31
+ :'ended_at' => :'ended_at',
32
+ :'usage' => :'usage'
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
+ :'created_at' => :'Time',
50
+ :'started_at' => :'Time',
51
+ :'ended_at' => :'Time',
52
+ :'usage' => :'ApiV1DiffusionPost200ResponseMetaUsage'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ApiV1JobJobIdGet200ResponseMeta` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ApiV1JobJobIdGet200ResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'created_at')
79
+ self.created_at = attributes[:'created_at']
80
+ end
81
+
82
+ if attributes.key?(:'started_at')
83
+ self.started_at = attributes[:'started_at']
84
+ end
85
+
86
+ if attributes.key?(:'ended_at')
87
+ self.ended_at = attributes[:'ended_at']
88
+ end
89
+
90
+ if attributes.key?(:'usage')
91
+ self.usage = attributes[:'usage']
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
+ 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
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ created_at == o.created_at &&
116
+ started_at == o.started_at &&
117
+ ended_at == o.ended_at &&
118
+ usage == o.usage
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [created_at, started_at, ended_at, usage].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ if value.nil?
163
+ is_nullable = self.class.openapi_nullable.include?(attr)
164
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
+ end
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ end
173
+
174
+ end
@@ -0,0 +1,177 @@
1
+ =begin
2
+ #Midjourney api-unofficial by Legnext.ai
3
+
4
+ ## **Legnext.ai Midjourney API: The Ultimate AI Image Generation Toolkit** Unlock the full creative potential of Midjourney directly within your applications and development workflows using the **Legnext.ai Midjourney API (Unofficial)**. This comprehensive collection offers a ready-to-integrate solution for professional image and video creation, manipulation, and high-fidelity upscaling. We provide developers with **stable, high-performance API access** to the Midjourney model. Crucially, integrating our service requires **no Midjourney account**, eliminating the hassle of managing official subscriptions or Discord interactions. Our toolkit simplifies the entire text-to-image process, supporting complex prompts, aspect ratio adjustments, and advanced style parameters. Focus on innovation while we handle the AI infrastructure. Start building scalable, visually stunning applications today with reliable access to the world’s leading generative AI model.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class ApiV1JobJobIdGet200ResponseOutput < ApiModelBase
18
+ attr_accessor :image_url
19
+
20
+ attr_accessor :image_urls
21
+
22
+ attr_accessor :seed
23
+
24
+ attr_accessor :available_actions
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'image_url' => :'image_url',
30
+ :'image_urls' => :'image_urls',
31
+ :'seed' => :'seed',
32
+ :'available_actions' => :'available_actions'
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
+ :'image_url' => :'String',
50
+ :'image_urls' => :'Array<String>',
51
+ :'seed' => :'String',
52
+ :'available_actions' => :'ApiV1JobJobIdGet200ResponseOutputAvailableActions'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'image_urls',
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ApiV1JobJobIdGet200ResponseOutput` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ acceptable_attribute_map = self.class.acceptable_attribute_map
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!acceptable_attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ApiV1JobJobIdGet200ResponseOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'image_url')
80
+ self.image_url = attributes[:'image_url']
81
+ end
82
+
83
+ if attributes.key?(:'image_urls')
84
+ if (value = attributes[:'image_urls']).is_a?(Array)
85
+ self.image_urls = value
86
+ end
87
+ end
88
+
89
+ if attributes.key?(:'seed')
90
+ self.seed = attributes[:'seed']
91
+ end
92
+
93
+ if attributes.key?(:'available_actions')
94
+ self.available_actions = attributes[:'available_actions']
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
102
+ invalid_properties = Array.new
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ warn '[DEPRECATED] the `valid?` method is obsolete'
110
+ true
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ image_url == o.image_url &&
119
+ image_urls == o.image_urls &&
120
+ seed == o.seed &&
121
+ available_actions == o.available_actions
122
+ end
123
+
124
+ # @see the `==` method
125
+ # @param [Object] Object to be compared
126
+ def eql?(o)
127
+ self == o
128
+ end
129
+
130
+ # Calculates hash code according to all attributes.
131
+ # @return [Integer] Hash code
132
+ def hash
133
+ [image_url, image_urls, seed, available_actions].hash
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def self.build_from_hash(attributes)
140
+ return nil unless attributes.is_a?(Hash)
141
+ attributes = attributes.transform_keys(&:to_sym)
142
+ transformed_hash = {}
143
+ openapi_types.each_pair do |key, type|
144
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = nil
146
+ elsif type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[attribute_map[key]].is_a?(Array)
150
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
151
+ end
152
+ elsif !attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
154
+ end
155
+ end
156
+ new(transformed_hash)
157
+ end
158
+
159
+ # Returns the object in the form of hash
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_hash
162
+ hash = {}
163
+ self.class.attribute_map.each_pair do |attr, param|
164
+ value = self.send(attr)
165
+ if value.nil?
166
+ is_nullable = self.class.openapi_nullable.include?(attr)
167
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
168
+ end
169
+
170
+ hash[param] = _to_hash(value)
171
+ end
172
+ hash
173
+ end
174
+
175
+ end
176
+
177
+ end
@@ -0,0 +1,224 @@
1
+ =begin
2
+ #Midjourney api-unofficial by Legnext.ai
3
+
4
+ ## **Legnext.ai Midjourney API: The Ultimate AI Image Generation Toolkit** Unlock the full creative potential of Midjourney directly within your applications and development workflows using the **Legnext.ai Midjourney API (Unofficial)**. This comprehensive collection offers a ready-to-integrate solution for professional image and video creation, manipulation, and high-fidelity upscaling. We provide developers with **stable, high-performance API access** to the Midjourney model. Crucially, integrating our service requires **no Midjourney account**, eliminating the hassle of managing official subscriptions or Discord interactions. Our toolkit simplifies the entire text-to-image process, supporting complex prompts, aspect ratio adjustments, and advanced style parameters. Focus on innovation while we handle the AI infrastructure. Start building scalable, visually stunning applications today with reliable access to the world’s leading generative AI model.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class ApiV1JobJobIdGet200ResponseOutputAvailableActions < ApiModelBase
18
+ attr_accessor :edit
19
+
20
+ attr_accessor :inpaint
21
+
22
+ attr_accessor :outpaint
23
+
24
+ attr_accessor :pan
25
+
26
+ attr_accessor :remix
27
+
28
+ attr_accessor :reroll
29
+
30
+ attr_accessor :upscale
31
+
32
+ attr_accessor :variation
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'edit' => :'edit',
38
+ :'inpaint' => :'inpaint',
39
+ :'outpaint' => :'outpaint',
40
+ :'pan' => :'pan',
41
+ :'remix' => :'remix',
42
+ :'reroll' => :'reroll',
43
+ :'upscale' => :'upscale',
44
+ :'variation' => :'variation'
45
+ }
46
+ end
47
+
48
+ # Returns attribute mapping this model knows about
49
+ def self.acceptable_attribute_map
50
+ attribute_map
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ acceptable_attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'edit' => :'Array<Integer>',
62
+ :'inpaint' => :'Array<Integer>',
63
+ :'outpaint' => :'Array<Integer>',
64
+ :'pan' => :'Array<Integer>',
65
+ :'remix' => :'Array<Integer>',
66
+ :'reroll' => :'Boolean',
67
+ :'upscale' => :'Array<Integer>',
68
+ :'variation' => :'Array<Integer>'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ApiV1JobJobIdGet200ResponseOutputAvailableActions` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!acceptable_attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ApiV1JobJobIdGet200ResponseOutputAvailableActions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'edit')
95
+ if (value = attributes[:'edit']).is_a?(Array)
96
+ self.edit = value
97
+ end
98
+ end
99
+
100
+ if attributes.key?(:'inpaint')
101
+ if (value = attributes[:'inpaint']).is_a?(Array)
102
+ self.inpaint = value
103
+ end
104
+ end
105
+
106
+ if attributes.key?(:'outpaint')
107
+ if (value = attributes[:'outpaint']).is_a?(Array)
108
+ self.outpaint = value
109
+ end
110
+ end
111
+
112
+ if attributes.key?(:'pan')
113
+ if (value = attributes[:'pan']).is_a?(Array)
114
+ self.pan = value
115
+ end
116
+ end
117
+
118
+ if attributes.key?(:'remix')
119
+ if (value = attributes[:'remix']).is_a?(Array)
120
+ self.remix = value
121
+ end
122
+ end
123
+
124
+ if attributes.key?(:'reroll')
125
+ self.reroll = attributes[:'reroll']
126
+ end
127
+
128
+ if attributes.key?(:'upscale')
129
+ if (value = attributes[:'upscale']).is_a?(Array)
130
+ self.upscale = value
131
+ end
132
+ end
133
+
134
+ if attributes.key?(:'variation')
135
+ if (value = attributes[:'variation']).is_a?(Array)
136
+ self.variation = value
137
+ end
138
+ end
139
+ end
140
+
141
+ # Show invalid properties with the reasons. Usually used together with valid?
142
+ # @return Array for valid properties with the reasons
143
+ def list_invalid_properties
144
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
145
+ invalid_properties = Array.new
146
+ invalid_properties
147
+ end
148
+
149
+ # Check to see if the all the properties in the model are valid
150
+ # @return true if the model is valid
151
+ def valid?
152
+ warn '[DEPRECATED] the `valid?` method is obsolete'
153
+ true
154
+ end
155
+
156
+ # Checks equality by comparing each attribute.
157
+ # @param [Object] Object to be compared
158
+ def ==(o)
159
+ return true if self.equal?(o)
160
+ self.class == o.class &&
161
+ edit == o.edit &&
162
+ inpaint == o.inpaint &&
163
+ outpaint == o.outpaint &&
164
+ pan == o.pan &&
165
+ remix == o.remix &&
166
+ reroll == o.reroll &&
167
+ upscale == o.upscale &&
168
+ variation == o.variation
169
+ end
170
+
171
+ # @see the `==` method
172
+ # @param [Object] Object to be compared
173
+ def eql?(o)
174
+ self == o
175
+ end
176
+
177
+ # Calculates hash code according to all attributes.
178
+ # @return [Integer] Hash code
179
+ def hash
180
+ [edit, inpaint, outpaint, pan, remix, reroll, upscale, variation].hash
181
+ end
182
+
183
+ # Builds the object from hash
184
+ # @param [Hash] attributes Model attributes in the form of hash
185
+ # @return [Object] Returns the model itself
186
+ def self.build_from_hash(attributes)
187
+ return nil unless attributes.is_a?(Hash)
188
+ attributes = attributes.transform_keys(&:to_sym)
189
+ transformed_hash = {}
190
+ openapi_types.each_pair do |key, type|
191
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
192
+ transformed_hash["#{key}"] = nil
193
+ elsif type =~ /\AArray<(.*)>/i
194
+ # check to ensure the input is an array given that the attribute
195
+ # is documented as an array but the input is not
196
+ if attributes[attribute_map[key]].is_a?(Array)
197
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
198
+ end
199
+ elsif !attributes[attribute_map[key]].nil?
200
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
201
+ end
202
+ end
203
+ new(transformed_hash)
204
+ end
205
+
206
+ # Returns the object in the form of hash
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_hash
209
+ hash = {}
210
+ self.class.attribute_map.each_pair do |attr, param|
211
+ value = self.send(attr)
212
+ if value.nil?
213
+ is_nullable = self.class.openapi_nullable.include?(attr)
214
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
215
+ end
216
+
217
+ hash[param] = _to_hash(value)
218
+ end
219
+ hash
220
+ end
221
+
222
+ end
223
+
224
+ end