tachain-sdk 0.1.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 +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +226 -0
- data/Rakefile +10 -0
- data/git_push.sh +54 -0
- data/lib/tachain-sdk/api/api_declaration_api.rb +396 -0
- data/lib/tachain-sdk/api/api_delivery_api.rb +676 -0
- data/lib/tachain-sdk/api/api_enum_api.rb +94 -0
- data/lib/tachain-sdk/api/api_order_api.rb +846 -0
- data/lib/tachain-sdk/api/api_order_workflow_api.rb +170 -0
- data/lib/tachain-sdk/api/api_production_api.rb +466 -0
- data/lib/tachain-sdk/api_client.rb +397 -0
- data/lib/tachain-sdk/api_error.rb +58 -0
- data/lib/tachain-sdk/api_model_base.rb +88 -0
- data/lib/tachain-sdk/configuration.rb +329 -0
- data/lib/tachain-sdk/models/api_declaration_delete_request.rb +341 -0
- data/lib/tachain-sdk/models/api_declaration_document_request.rb +209 -0
- data/lib/tachain-sdk/models/api_declaration_list_dto.rb +251 -0
- data/lib/tachain-sdk/models/api_declaration_submit_request.rb +251 -0
- data/lib/tachain-sdk/models/api_declaration_submit_result_dto.rb +197 -0
- data/lib/tachain-sdk/models/api_integration_delete_request.rb +209 -0
- data/lib/tachain-sdk/models/api_order_confirm_receipt_request.rb +216 -0
- data/lib/tachain-sdk/models/api_order_submit_audit_request.rb +243 -0
- data/lib/tachain-sdk/models/api_response_api_declaration_list_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_api_declaration_submit_result_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_delivery_note_api_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_order_api_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_production_api_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_string.rb +200 -0
- data/lib/tachain-sdk/models/attachment_in_api_create_dto.rb +262 -0
- data/lib/tachain-sdk/models/attachment_in_api_dto.rb +363 -0
- data/lib/tachain-sdk/models/brand_kpi_policy_result.rb +334 -0
- data/lib/tachain-sdk/models/brand_order_kpi_snapshot_dto.rb +880 -0
- data/lib/tachain-sdk/models/brand_order_supplier_order_snapshot_dto.rb +749 -0
- data/lib/tachain-sdk/models/brand_order_uncompleted_declare_snapshot_dto.rb +513 -0
- data/lib/tachain-sdk/models/company.rb +780 -0
- data/lib/tachain-sdk/models/company_compliance_profile.rb +547 -0
- data/lib/tachain-sdk/models/company_utility_declaration.rb +592 -0
- data/lib/tachain-sdk/models/customer.rb +569 -0
- data/lib/tachain-sdk/models/delivery_note_api_dto.rb +597 -0
- data/lib/tachain-sdk/models/delivery_note_detail_api_dto.rb +682 -0
- data/lib/tachain-sdk/models/document_type_api_dto.rb +480 -0
- data/lib/tachain-sdk/models/factory.rb +545 -0
- data/lib/tachain-sdk/models/get_v1_enum_get_list200_response.rb +201 -0
- data/lib/tachain-sdk/models/microsoft_asp_net_core_mvc_problem_details.rb +188 -0
- data/lib/tachain-sdk/models/model1.rb +157 -0
- data/lib/tachain-sdk/models/model3.rb +202 -0
- data/lib/tachain-sdk/models/model4.rb +202 -0
- data/lib/tachain-sdk/models/order.rb +974 -0
- data/lib/tachain-sdk/models/order_api_dto.rb +918 -0
- data/lib/tachain-sdk/models/order_line.rb +1184 -0
- data/lib/tachain-sdk/models/order_line_api_dto.rb +1277 -0
- data/lib/tachain-sdk/models/order_stage_form_api_dto.rb +270 -0
- data/lib/tachain-sdk/models/order_stage_form_datum_api_dto.rb +260 -0
- data/lib/tachain-sdk/models/order_stage_form_dto.rb +254 -0
- data/lib/tachain-sdk/models/paged_response_delivery_note_api_dto.rb +296 -0
- data/lib/tachain-sdk/models/paged_response_order_api_dto.rb +296 -0
- data/lib/tachain-sdk/models/paged_response_production_api_dto.rb +296 -0
- data/lib/tachain-sdk/models/product_bom_grouping_dto.rb +280 -0
- data/lib/tachain-sdk/models/production_api_dto.rb +639 -0
- data/lib/tachain-sdk/models/production_raw_material_api_dto.rb +481 -0
- data/lib/tachain-sdk/models/production_raw_material_dto.rb +548 -0
- data/lib/tachain-sdk/models/production_sales_order_api_dto.rb +436 -0
- data/lib/tachain-sdk/models/result_api_enum.rb +270 -0
- data/lib/tachain-sdk/models/result_brand_report_allocated_delivery_kpi_detail.rb +331 -0
- data/lib/tachain-sdk/models/result_brand_report_unlinked_order_detail.rb +229 -0
- data/lib/tachain-sdk/models/result_kpi_archived_data_change_detail.rb +418 -0
- data/lib/tachain-sdk/models/result_mapping_order_select.rb +335 -0
- data/lib/tachain-sdk/models/result_order_trace_report.rb +721 -0
- data/lib/tachain-sdk/models/stage_attachment_api_dto.rb +398 -0
- data/lib/tachain-sdk/models/supplier.rb +585 -0
- data/lib/tachain-sdk/models/supplier_onboarding_ext.rb +383 -0
- data/lib/tachain-sdk/models/template_dto_business_risk_warn_info_dto.rb +456 -0
- data/lib/tachain-sdk/models/template_dto_multi_so_line_complete_status.rb +227 -0
- data/lib/tachain-sdk/models/trader.rb +506 -0
- data/lib/tachain-sdk/signed_api_client.rb +65 -0
- data/lib/tachain-sdk/version.rb +15 -0
- data/lib/tachain-sdk.rb +108 -0
- data/spec/spec_helper.rb +111 -0
- data/tachain-sdk.gemspec +39 -0
- metadata +165 -0
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Tactic Chain Public API
|
|
3
|
+
|
|
4
|
+
#Public integration endpoints. Set your own base URL and credential before calling.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TachainSdk
|
|
17
|
+
# Table, document_type
|
|
18
|
+
class DocumentTypeApiDto < ApiModelBase
|
|
19
|
+
# 文档类型ID
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# 文档code
|
|
23
|
+
attr_accessor :code
|
|
24
|
+
|
|
25
|
+
# 文档名称
|
|
26
|
+
attr_accessor :name
|
|
27
|
+
|
|
28
|
+
# 文档类别(From/Attachment/Both)
|
|
29
|
+
attr_accessor :type
|
|
30
|
+
|
|
31
|
+
# 允许的文件格式(仅附件类型需要)
|
|
32
|
+
attr_accessor :allowed_format
|
|
33
|
+
|
|
34
|
+
# 表单结构定义(仅表单类型需要)json
|
|
35
|
+
attr_accessor :schema_definition
|
|
36
|
+
|
|
37
|
+
# 备注
|
|
38
|
+
attr_accessor :remark
|
|
39
|
+
|
|
40
|
+
# -9 禁用, -1 删除, 0 正常
|
|
41
|
+
attr_accessor :status
|
|
42
|
+
|
|
43
|
+
# 创建用户ID
|
|
44
|
+
attr_accessor :created_by
|
|
45
|
+
|
|
46
|
+
# 修改用户ID
|
|
47
|
+
attr_accessor :updated_by
|
|
48
|
+
|
|
49
|
+
# 创建时间
|
|
50
|
+
attr_accessor :created_at
|
|
51
|
+
|
|
52
|
+
# 更新时间
|
|
53
|
+
attr_accessor :updated_at
|
|
54
|
+
|
|
55
|
+
# 文件数量限制
|
|
56
|
+
attr_accessor :file_quantity_limit
|
|
57
|
+
|
|
58
|
+
# 模板示例
|
|
59
|
+
attr_accessor :example_template
|
|
60
|
+
|
|
61
|
+
# 模板名称,带后缀
|
|
62
|
+
attr_accessor :example_name
|
|
63
|
+
|
|
64
|
+
# 是否启动ai审核功能
|
|
65
|
+
attr_accessor :is_start_ai
|
|
66
|
+
|
|
67
|
+
# 是否必填
|
|
68
|
+
attr_accessor :is_required
|
|
69
|
+
|
|
70
|
+
# 完成情况
|
|
71
|
+
attr_accessor :iscomplete
|
|
72
|
+
|
|
73
|
+
# 数据来源,0 买卖双方都可以,1 卖方优先,2 买方优先,3 仅卖方,4 仅买方
|
|
74
|
+
attr_accessor :from
|
|
75
|
+
|
|
76
|
+
attr_accessor :file_list
|
|
77
|
+
|
|
78
|
+
attr_accessor :form_data_list
|
|
79
|
+
|
|
80
|
+
# 翻译后的名称
|
|
81
|
+
attr_accessor :local_name
|
|
82
|
+
|
|
83
|
+
# 翻译后的备注
|
|
84
|
+
attr_accessor :local_remark
|
|
85
|
+
|
|
86
|
+
# 去除 po_ 前缀后的采购加工阶段编码。
|
|
87
|
+
attr_accessor :scope_code
|
|
88
|
+
|
|
89
|
+
# 申报规则配置的纤维编码,支持逗号分隔多个 ID。
|
|
90
|
+
attr_accessor :fiber_code
|
|
91
|
+
|
|
92
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
93
|
+
def self.attribute_map
|
|
94
|
+
{
|
|
95
|
+
:'id' => :'id',
|
|
96
|
+
:'code' => :'code',
|
|
97
|
+
:'name' => :'name',
|
|
98
|
+
:'type' => :'type',
|
|
99
|
+
:'allowed_format' => :'allowedFormat',
|
|
100
|
+
:'schema_definition' => :'schemaDefinition',
|
|
101
|
+
:'remark' => :'remark',
|
|
102
|
+
:'status' => :'status',
|
|
103
|
+
:'created_by' => :'createdBy',
|
|
104
|
+
:'updated_by' => :'updatedBy',
|
|
105
|
+
:'created_at' => :'createdAt',
|
|
106
|
+
:'updated_at' => :'updatedAt',
|
|
107
|
+
:'file_quantity_limit' => :'fileQuantityLimit',
|
|
108
|
+
:'example_template' => :'exampleTemplate',
|
|
109
|
+
:'example_name' => :'exampleName',
|
|
110
|
+
:'is_start_ai' => :'isStartAi',
|
|
111
|
+
:'is_required' => :'isRequired',
|
|
112
|
+
:'iscomplete' => :'iscomplete',
|
|
113
|
+
:'from' => :'from',
|
|
114
|
+
:'file_list' => :'fileList',
|
|
115
|
+
:'form_data_list' => :'formDataList',
|
|
116
|
+
:'local_name' => :'localName',
|
|
117
|
+
:'local_remark' => :'localRemark',
|
|
118
|
+
:'scope_code' => :'scopeCode',
|
|
119
|
+
:'fiber_code' => :'fiberCode'
|
|
120
|
+
}
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Returns attribute mapping this model knows about
|
|
124
|
+
def self.acceptable_attribute_map
|
|
125
|
+
attribute_map
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Returns all the JSON keys this model knows about
|
|
129
|
+
def self.acceptable_attributes
|
|
130
|
+
acceptable_attribute_map.values
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Attribute type mapping.
|
|
134
|
+
def self.openapi_types
|
|
135
|
+
{
|
|
136
|
+
:'id' => :'String',
|
|
137
|
+
:'code' => :'String',
|
|
138
|
+
:'name' => :'String',
|
|
139
|
+
:'type' => :'String',
|
|
140
|
+
:'allowed_format' => :'String',
|
|
141
|
+
:'schema_definition' => :'String',
|
|
142
|
+
:'remark' => :'String',
|
|
143
|
+
:'status' => :'Integer',
|
|
144
|
+
:'created_by' => :'String',
|
|
145
|
+
:'updated_by' => :'String',
|
|
146
|
+
:'created_at' => :'Time',
|
|
147
|
+
:'updated_at' => :'Time',
|
|
148
|
+
:'file_quantity_limit' => :'Integer',
|
|
149
|
+
:'example_template' => :'String',
|
|
150
|
+
:'example_name' => :'String',
|
|
151
|
+
:'is_start_ai' => :'Boolean',
|
|
152
|
+
:'is_required' => :'Integer',
|
|
153
|
+
:'iscomplete' => :'String',
|
|
154
|
+
:'from' => :'Integer',
|
|
155
|
+
:'file_list' => :'Array<AttachmentInApiDto>',
|
|
156
|
+
:'form_data_list' => :'Array<OrderStageFormApiDto>',
|
|
157
|
+
:'local_name' => :'String',
|
|
158
|
+
:'local_remark' => :'String',
|
|
159
|
+
:'scope_code' => :'String',
|
|
160
|
+
:'fiber_code' => :'String'
|
|
161
|
+
}
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# List of attributes with nullable: true
|
|
165
|
+
def self.openapi_nullable
|
|
166
|
+
Set.new([
|
|
167
|
+
:'id',
|
|
168
|
+
:'code',
|
|
169
|
+
:'name',
|
|
170
|
+
:'type',
|
|
171
|
+
:'allowed_format',
|
|
172
|
+
:'schema_definition',
|
|
173
|
+
:'remark',
|
|
174
|
+
:'status',
|
|
175
|
+
:'created_by',
|
|
176
|
+
:'updated_by',
|
|
177
|
+
:'created_at',
|
|
178
|
+
:'updated_at',
|
|
179
|
+
:'file_quantity_limit',
|
|
180
|
+
:'example_template',
|
|
181
|
+
:'example_name',
|
|
182
|
+
:'is_start_ai',
|
|
183
|
+
:'iscomplete',
|
|
184
|
+
:'local_name',
|
|
185
|
+
:'local_remark',
|
|
186
|
+
:'scope_code',
|
|
187
|
+
:'fiber_code'
|
|
188
|
+
])
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Initializes the object
|
|
192
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
193
|
+
def initialize(attributes = {})
|
|
194
|
+
if (!attributes.is_a?(Hash))
|
|
195
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::DocumentTypeApiDto` initialize method"
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
199
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
200
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
201
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
202
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::DocumentTypeApiDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
203
|
+
end
|
|
204
|
+
h[k.to_sym] = v
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if attributes.key?(:'id')
|
|
208
|
+
self.id = attributes[:'id']
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'code')
|
|
212
|
+
self.code = attributes[:'code']
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if attributes.key?(:'name')
|
|
216
|
+
self.name = attributes[:'name']
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if attributes.key?(:'type')
|
|
220
|
+
self.type = attributes[:'type']
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'allowed_format')
|
|
224
|
+
self.allowed_format = attributes[:'allowed_format']
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if attributes.key?(:'schema_definition')
|
|
228
|
+
self.schema_definition = attributes[:'schema_definition']
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if attributes.key?(:'remark')
|
|
232
|
+
self.remark = attributes[:'remark']
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if attributes.key?(:'status')
|
|
236
|
+
self.status = attributes[:'status']
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if attributes.key?(:'created_by')
|
|
240
|
+
self.created_by = attributes[:'created_by']
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'updated_by')
|
|
244
|
+
self.updated_by = attributes[:'updated_by']
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if attributes.key?(:'created_at')
|
|
248
|
+
self.created_at = attributes[:'created_at']
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
if attributes.key?(:'updated_at')
|
|
252
|
+
self.updated_at = attributes[:'updated_at']
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if attributes.key?(:'file_quantity_limit')
|
|
256
|
+
self.file_quantity_limit = attributes[:'file_quantity_limit']
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if attributes.key?(:'example_template')
|
|
260
|
+
self.example_template = attributes[:'example_template']
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
if attributes.key?(:'example_name')
|
|
264
|
+
self.example_name = attributes[:'example_name']
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if attributes.key?(:'is_start_ai')
|
|
268
|
+
self.is_start_ai = attributes[:'is_start_ai']
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
if attributes.key?(:'is_required')
|
|
272
|
+
self.is_required = attributes[:'is_required']
|
|
273
|
+
else
|
|
274
|
+
self.is_required = nil
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
if attributes.key?(:'iscomplete')
|
|
278
|
+
self.iscomplete = attributes[:'iscomplete']
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
if attributes.key?(:'from')
|
|
282
|
+
self.from = attributes[:'from']
|
|
283
|
+
else
|
|
284
|
+
self.from = nil
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
if attributes.key?(:'file_list')
|
|
288
|
+
if (value = attributes[:'file_list']).is_a?(Array)
|
|
289
|
+
self.file_list = value
|
|
290
|
+
end
|
|
291
|
+
else
|
|
292
|
+
self.file_list = nil
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
if attributes.key?(:'form_data_list')
|
|
296
|
+
if (value = attributes[:'form_data_list']).is_a?(Array)
|
|
297
|
+
self.form_data_list = value
|
|
298
|
+
end
|
|
299
|
+
else
|
|
300
|
+
self.form_data_list = nil
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
if attributes.key?(:'local_name')
|
|
304
|
+
self.local_name = attributes[:'local_name']
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
if attributes.key?(:'local_remark')
|
|
308
|
+
self.local_remark = attributes[:'local_remark']
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
if attributes.key?(:'scope_code')
|
|
312
|
+
self.scope_code = attributes[:'scope_code']
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
if attributes.key?(:'fiber_code')
|
|
316
|
+
self.fiber_code = attributes[:'fiber_code']
|
|
317
|
+
end
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
321
|
+
# @return Array for valid properties with the reasons
|
|
322
|
+
def list_invalid_properties
|
|
323
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
324
|
+
invalid_properties = Array.new
|
|
325
|
+
if @is_required.nil?
|
|
326
|
+
invalid_properties.push('invalid value for "is_required", is_required cannot be nil.')
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
if @from.nil?
|
|
330
|
+
invalid_properties.push('invalid value for "from", from cannot be nil.')
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
if @file_list.nil?
|
|
334
|
+
invalid_properties.push('invalid value for "file_list", file_list cannot be nil.')
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
if @form_data_list.nil?
|
|
338
|
+
invalid_properties.push('invalid value for "form_data_list", form_data_list cannot be nil.')
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
invalid_properties
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Check to see if the all the properties in the model are valid
|
|
345
|
+
# @return true if the model is valid
|
|
346
|
+
def valid?
|
|
347
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
348
|
+
return false if @is_required.nil?
|
|
349
|
+
return false if @from.nil?
|
|
350
|
+
return false if @file_list.nil?
|
|
351
|
+
return false if @form_data_list.nil?
|
|
352
|
+
true
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# Custom attribute writer method with validation
|
|
356
|
+
# @param [Object] is_required Value to be assigned
|
|
357
|
+
def is_required=(is_required)
|
|
358
|
+
if is_required.nil?
|
|
359
|
+
fail ArgumentError, 'is_required cannot be nil'
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
@is_required = is_required
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Custom attribute writer method with validation
|
|
366
|
+
# @param [Object] from Value to be assigned
|
|
367
|
+
def from=(from)
|
|
368
|
+
if from.nil?
|
|
369
|
+
fail ArgumentError, 'from cannot be nil'
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
@from = from
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Custom attribute writer method with validation
|
|
376
|
+
# @param [Object] file_list Value to be assigned
|
|
377
|
+
def file_list=(file_list)
|
|
378
|
+
if file_list.nil?
|
|
379
|
+
fail ArgumentError, 'file_list cannot be nil'
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
@file_list = file_list
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# Custom attribute writer method with validation
|
|
386
|
+
# @param [Object] form_data_list Value to be assigned
|
|
387
|
+
def form_data_list=(form_data_list)
|
|
388
|
+
if form_data_list.nil?
|
|
389
|
+
fail ArgumentError, 'form_data_list cannot be nil'
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
@form_data_list = form_data_list
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# Checks equality by comparing each attribute.
|
|
396
|
+
# @param [Object] Object to be compared
|
|
397
|
+
def ==(o)
|
|
398
|
+
return true if self.equal?(o)
|
|
399
|
+
self.class == o.class &&
|
|
400
|
+
id == o.id &&
|
|
401
|
+
code == o.code &&
|
|
402
|
+
name == o.name &&
|
|
403
|
+
type == o.type &&
|
|
404
|
+
allowed_format == o.allowed_format &&
|
|
405
|
+
schema_definition == o.schema_definition &&
|
|
406
|
+
remark == o.remark &&
|
|
407
|
+
status == o.status &&
|
|
408
|
+
created_by == o.created_by &&
|
|
409
|
+
updated_by == o.updated_by &&
|
|
410
|
+
created_at == o.created_at &&
|
|
411
|
+
updated_at == o.updated_at &&
|
|
412
|
+
file_quantity_limit == o.file_quantity_limit &&
|
|
413
|
+
example_template == o.example_template &&
|
|
414
|
+
example_name == o.example_name &&
|
|
415
|
+
is_start_ai == o.is_start_ai &&
|
|
416
|
+
is_required == o.is_required &&
|
|
417
|
+
iscomplete == o.iscomplete &&
|
|
418
|
+
from == o.from &&
|
|
419
|
+
file_list == o.file_list &&
|
|
420
|
+
form_data_list == o.form_data_list &&
|
|
421
|
+
local_name == o.local_name &&
|
|
422
|
+
local_remark == o.local_remark &&
|
|
423
|
+
scope_code == o.scope_code &&
|
|
424
|
+
fiber_code == o.fiber_code
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
# @see the `==` method
|
|
428
|
+
# @param [Object] Object to be compared
|
|
429
|
+
def eql?(o)
|
|
430
|
+
self == o
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
# Calculates hash code according to all attributes.
|
|
434
|
+
# @return [Integer] Hash code
|
|
435
|
+
def hash
|
|
436
|
+
[id, code, name, type, allowed_format, schema_definition, remark, status, created_by, updated_by, created_at, updated_at, file_quantity_limit, example_template, example_name, is_start_ai, is_required, iscomplete, from, file_list, form_data_list, local_name, local_remark, scope_code, fiber_code].hash
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
# Builds the object from hash
|
|
440
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
441
|
+
# @return [Object] Returns the model itself
|
|
442
|
+
def self.build_from_hash(attributes)
|
|
443
|
+
return nil unless attributes.is_a?(Hash)
|
|
444
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
445
|
+
transformed_hash = {}
|
|
446
|
+
openapi_types.each_pair do |key, type|
|
|
447
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
448
|
+
transformed_hash["#{key}"] = nil
|
|
449
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
450
|
+
# check to ensure the input is an array given that the attribute
|
|
451
|
+
# is documented as an array but the input is not
|
|
452
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
453
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
454
|
+
end
|
|
455
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
456
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
457
|
+
end
|
|
458
|
+
end
|
|
459
|
+
new(transformed_hash)
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
# Returns the object in the form of hash
|
|
463
|
+
# @return [Hash] Returns the object in the form of hash
|
|
464
|
+
def to_hash
|
|
465
|
+
hash = {}
|
|
466
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
467
|
+
value = self.send(attr)
|
|
468
|
+
if value.nil?
|
|
469
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
470
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
hash[param] = _to_hash(value)
|
|
474
|
+
end
|
|
475
|
+
hash
|
|
476
|
+
end
|
|
477
|
+
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
end
|