pdf4me 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +472 -0
- data/Rakefile +8 -0
- data/docs/ActionFlow.md +8 -0
- data/docs/ApiUsageRes.md +11 -0
- data/docs/ArchiveConfig.md +11 -0
- data/docs/ArchiveJobReq.md +12 -0
- data/docs/ArchiveJobRes.md +9 -0
- data/docs/Color.md +10 -0
- data/docs/ConvertApi.md +102 -0
- data/docs/ConvertToPdf.md +10 -0
- data/docs/ConvertToPdfAction.md +10 -0
- data/docs/ConvertToPdfRes.md +8 -0
- data/docs/CreateImages.md +10 -0
- data/docs/CreateImagesRes.md +8 -0
- data/docs/CreatePdfA.md +10 -0
- data/docs/CreatePdfARes.md +8 -0
- data/docs/CustomCMSConfig.md +23 -0
- data/docs/DocAction.md +8 -0
- data/docs/DocLog.md +12 -0
- data/docs/DocMetadata.md +16 -0
- data/docs/Document.md +16 -0
- data/docs/DocumentApi.md +203 -0
- data/docs/DropDocumentReq.md +20 -0
- data/docs/DropDocumentRes.md +15 -0
- data/docs/ExecutionTrigger.md +10 -0
- data/docs/Extract.md +10 -0
- data/docs/ExtractAction.md +9 -0
- data/docs/ExtractApi.md +102 -0
- data/docs/ExtractRes.md +8 -0
- data/docs/GetDocumentListRes.md +13 -0
- data/docs/GetDocumentReq.md +14 -0
- data/docs/GetDocumentRes.md +14 -0
- data/docs/IFormFile.md +13 -0
- data/docs/Image.md +15 -0
- data/docs/ImageAction.md +30 -0
- data/docs/ImageApi.md +107 -0
- data/docs/Job.md +10 -0
- data/docs/JobApi.md +197 -0
- data/docs/JobConfig.md +18 -0
- data/docs/JobConfigRes.md +8 -0
- data/docs/KeyValuePairStringObject.md +9 -0
- data/docs/KeyValuePairStringString.md +9 -0
- data/docs/ManagementApi.md +92 -0
- data/docs/Merge.md +10 -0
- data/docs/MergeAction.md +8 -0
- data/docs/MergeApi.md +102 -0
- data/docs/MergeRes.md +8 -0
- data/docs/Notification.md +9 -0
- data/docs/OcrAction.md +12 -0
- data/docs/OcrApi.md +57 -0
- data/docs/Optimize.md +10 -0
- data/docs/OptimizeAction.md +35 -0
- data/docs/OptimizeApi.md +103 -0
- data/docs/OptimizeRes.md +9 -0
- data/docs/Page.md +14 -0
- data/docs/PageSelection.md +10 -0
- data/docs/Pdf4meAction.md +12 -0
- data/docs/Pdf4meDocument.md +32 -0
- data/docs/Pdf4meException.md +8 -0
- data/docs/PdfAAction.md +14 -0
- data/docs/PdfAApi.md +102 -0
- data/docs/PdfFont.md +9 -0
- data/docs/Pricing.md +13 -0
- data/docs/ProduceDocuments.md +14 -0
- data/docs/ProduceDocumentsRes.md +8 -0
- data/docs/ProduceOutput.md +8 -0
- data/docs/RGBSet.md +10 -0
- data/docs/RecognizeDocument.md +10 -0
- data/docs/RecognizeDocumentRes.md +9 -0
- data/docs/Rectangle.md +11 -0
- data/docs/Rotate.md +10 -0
- data/docs/RunJobRes.md +10 -0
- data/docs/SignatureConfig.md +7 -0
- data/docs/Split.md +10 -0
- data/docs/SplitAction.md +11 -0
- data/docs/SplitApi.md +103 -0
- data/docs/SplitRes.md +8 -0
- data/docs/Stamp.md +10 -0
- data/docs/StampAction.md +22 -0
- data/docs/StampApi.md +110 -0
- data/docs/StampRes.md +8 -0
- data/docs/StorageFolder.md +10 -0
- data/docs/Text.md +17 -0
- data/docs/Transform.md +13 -0
- data/docs/Translate.md +9 -0
- data/docs/UserFingerprint.md +9 -0
- data/docs/VersionRes.md +8 -0
- data/docs/java.md +425 -0
- data/git_push.sh +55 -0
- data/lib/pdf4me.rb +124 -0
- data/lib/pdf4me/api/convert_api.rb +130 -0
- data/lib/pdf4me/api/document_api.rb +218 -0
- data/lib/pdf4me/api/extract_api.rb +131 -0
- data/lib/pdf4me/api/image_api.rb +139 -0
- data/lib/pdf4me/api/job_api.rb +223 -0
- data/lib/pdf4me/api/management_api.rb +117 -0
- data/lib/pdf4me/api/merge_api.rb +131 -0
- data/lib/pdf4me/api/ocr_api.rb +74 -0
- data/lib/pdf4me/api/optimize_api.rb +139 -0
- data/lib/pdf4me/api/pdf_a_api.rb +134 -0
- data/lib/pdf4me/api/split_api.rb +135 -0
- data/lib/pdf4me/api/stamp_api.rb +159 -0
- data/lib/pdf4me/api_client.rb +380 -0
- data/lib/pdf4me/api_error.rb +38 -0
- data/lib/pdf4me/configuration.rb +109 -0
- data/lib/pdf4me/models/action_flow.rb +190 -0
- data/lib/pdf4me/models/api_usage_res.rb +219 -0
- data/lib/pdf4me/models/archive_config.rb +226 -0
- data/lib/pdf4me/models/archive_job_req.rb +249 -0
- data/lib/pdf4me/models/archive_job_res.rb +207 -0
- data/lib/pdf4me/models/color.rb +206 -0
- data/lib/pdf4me/models/convert_to_pdf.rb +209 -0
- data/lib/pdf4me/models/convert_to_pdf_action.rb +253 -0
- data/lib/pdf4me/models/convert_to_pdf_res.rb +189 -0
- data/lib/pdf4me/models/create_images.rb +209 -0
- data/lib/pdf4me/models/create_images_res.rb +189 -0
- data/lib/pdf4me/models/create_pdf_a.rb +209 -0
- data/lib/pdf4me/models/create_pdf_a_res.rb +189 -0
- data/lib/pdf4me/models/custom_cms_config.rb +323 -0
- data/lib/pdf4me/models/doc_action.rb +190 -0
- data/lib/pdf4me/models/doc_log.rb +257 -0
- data/lib/pdf4me/models/doc_metadata.rb +285 -0
- data/lib/pdf4me/models/document.rb +285 -0
- data/lib/pdf4me/models/drop_document_req.rb +348 -0
- data/lib/pdf4me/models/drop_document_res.rb +260 -0
- data/lib/pdf4me/models/execution_trigger.rb +206 -0
- data/lib/pdf4me/models/extract.rb +207 -0
- data/lib/pdf4me/models/extract_action.rb +201 -0
- data/lib/pdf4me/models/extract_res.rb +188 -0
- data/lib/pdf4me/models/get_document_list_res.rb +237 -0
- data/lib/pdf4me/models/get_document_req.rb +243 -0
- data/lib/pdf4me/models/get_document_res.rb +246 -0
- data/lib/pdf4me/models/i_form_file.rb +235 -0
- data/lib/pdf4me/models/image.rb +300 -0
- data/lib/pdf4me/models/image_action.rb +513 -0
- data/lib/pdf4me/models/job.rb +213 -0
- data/lib/pdf4me/models/job_config.rb +298 -0
- data/lib/pdf4me/models/job_config_res.rb +193 -0
- data/lib/pdf4me/models/key_value_pair_string_object.rb +197 -0
- data/lib/pdf4me/models/key_value_pair_string_string.rb +197 -0
- data/lib/pdf4me/models/merge.rb +209 -0
- data/lib/pdf4me/models/merge_action.rb +190 -0
- data/lib/pdf4me/models/merge_res.rb +188 -0
- data/lib/pdf4me/models/notification.rb +199 -0
- data/lib/pdf4me/models/ocr_action.rb +259 -0
- data/lib/pdf4me/models/optimize.rb +209 -0
- data/lib/pdf4me/models/optimize_action.rb +514 -0
- data/lib/pdf4me/models/optimize_res.rb +199 -0
- data/lib/pdf4me/models/page.rb +258 -0
- data/lib/pdf4me/models/page_selection.rb +246 -0
- data/lib/pdf4me/models/pdf4me_action.rb +259 -0
- data/lib/pdf4me/models/pdf4me_document.rb +511 -0
- data/lib/pdf4me/models/pdf4me_exception.rb +189 -0
- data/lib/pdf4me/models/pdf_a_action.rb +297 -0
- data/lib/pdf4me/models/pdf_font.rb +213 -0
- data/lib/pdf4me/models/pricing.rb +278 -0
- data/lib/pdf4me/models/produce_documents.rb +251 -0
- data/lib/pdf4me/models/produce_documents_res.rb +191 -0
- data/lib/pdf4me/models/produce_output.rb +221 -0
- data/lib/pdf4me/models/recognize_document.rb +209 -0
- data/lib/pdf4me/models/recognize_document_res.rb +198 -0
- data/lib/pdf4me/models/rectangle.rb +215 -0
- data/lib/pdf4me/models/rgb_set.rb +206 -0
- data/lib/pdf4me/models/rotate.rb +221 -0
- data/lib/pdf4me/models/run_job_res.rb +215 -0
- data/lib/pdf4me/models/signature_config.rb +179 -0
- data/lib/pdf4me/models/split.rb +207 -0
- data/lib/pdf4me/models/split_action.rb +219 -0
- data/lib/pdf4me/models/split_res.rb +190 -0
- data/lib/pdf4me/models/stamp.rb +209 -0
- data/lib/pdf4me/models/stamp_action.rb +387 -0
- data/lib/pdf4me/models/stamp_res.rb +189 -0
- data/lib/pdf4me/models/storage_folder.rb +239 -0
- data/lib/pdf4me/models/text.rb +320 -0
- data/lib/pdf4me/models/transform.rb +263 -0
- data/lib/pdf4me/models/translate.rb +207 -0
- data/lib/pdf4me/models/user_fingerprint.rb +197 -0
- data/lib/pdf4me/models/version_res.rb +188 -0
- data/lib/pdf4me/version.rb +15 -0
- data/pdf4me.gemspec +47 -0
- data/spec/api/convert_api_spec.rb +60 -0
- data/spec/api/document_api_spec.rb +83 -0
- data/spec/api/extract_api_spec.rb +60 -0
- data/spec/api/image_api_spec.rb +62 -0
- data/spec/api/job_api_spec.rb +82 -0
- data/spec/api/management_api_spec.rb +57 -0
- data/spec/api/merge_api_spec.rb +60 -0
- data/spec/api/ocr_api_spec.rb +47 -0
- data/spec/api/optimize_api_spec.rb +60 -0
- data/spec/api/pdf_a_api_spec.rb +60 -0
- data/spec/api/split_api_spec.rb +60 -0
- data/spec/api/stamp_api_spec.rb +63 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/action_flow_spec.rb +42 -0
- data/spec/models/api_usage_res_spec.rb +60 -0
- data/spec/models/archive_config_spec.rb +60 -0
- data/spec/models/archive_job_req_spec.rb +66 -0
- data/spec/models/archive_job_res_spec.rb +48 -0
- data/spec/models/color_spec.rb +54 -0
- data/spec/models/convert_to_pdf_action_spec.rb +62 -0
- data/spec/models/convert_to_pdf_res_spec.rb +42 -0
- data/spec/models/convert_to_pdf_spec.rb +54 -0
- data/spec/models/create_images_res_spec.rb +42 -0
- data/spec/models/create_images_spec.rb +54 -0
- data/spec/models/create_pdf_a_res_spec.rb +42 -0
- data/spec/models/create_pdf_a_spec.rb +54 -0
- data/spec/models/custom_cms_config_spec.rb +132 -0
- data/spec/models/doc_action_spec.rb +42 -0
- data/spec/models/doc_log_spec.rb +70 -0
- data/spec/models/doc_metadata_spec.rb +90 -0
- data/spec/models/document_spec.rb +90 -0
- data/spec/models/drop_document_req_spec.rb +118 -0
- data/spec/models/drop_document_res_spec.rb +84 -0
- data/spec/models/execution_trigger_spec.rb +54 -0
- data/spec/models/extract_action_spec.rb +48 -0
- data/spec/models/extract_res_spec.rb +42 -0
- data/spec/models/extract_spec.rb +54 -0
- data/spec/models/get_document_list_res_spec.rb +72 -0
- data/spec/models/get_document_req_spec.rb +78 -0
- data/spec/models/get_document_res_spec.rb +78 -0
- data/spec/models/i_form_file_spec.rb +72 -0
- data/spec/models/image_action_spec.rb +206 -0
- data/spec/models/image_spec.rb +88 -0
- data/spec/models/job_config_res_spec.rb +42 -0
- data/spec/models/job_config_spec.rb +102 -0
- data/spec/models/job_spec.rb +54 -0
- data/spec/models/key_value_pair_string_object_spec.rb +48 -0
- data/spec/models/key_value_pair_string_string_spec.rb +48 -0
- data/spec/models/merge_action_spec.rb +42 -0
- data/spec/models/merge_res_spec.rb +42 -0
- data/spec/models/merge_spec.rb +54 -0
- data/spec/models/notification_spec.rb +48 -0
- data/spec/models/ocr_action_spec.rb +70 -0
- data/spec/models/optimize_action_spec.rb +228 -0
- data/spec/models/optimize_res_spec.rb +48 -0
- data/spec/models/optimize_spec.rb +54 -0
- data/spec/models/page_selection_spec.rb +58 -0
- data/spec/models/page_spec.rb +78 -0
- data/spec/models/pdf4me_action_spec.rb +70 -0
- data/spec/models/pdf4me_document_spec.rb +202 -0
- data/spec/models/pdf4me_exception_spec.rb +42 -0
- data/spec/models/pdf_a_action_spec.rb +86 -0
- data/spec/models/pdf_font_spec.rb +48 -0
- data/spec/models/pricing_spec.rb +80 -0
- data/spec/models/produce_documents_res_spec.rb +42 -0
- data/spec/models/produce_documents_spec.rb +78 -0
- data/spec/models/produce_output_spec.rb +46 -0
- data/spec/models/recognize_document_res_spec.rb +48 -0
- data/spec/models/recognize_document_spec.rb +54 -0
- data/spec/models/rectangle_spec.rb +60 -0
- data/spec/models/rgb_set_spec.rb +54 -0
- data/spec/models/rotate_spec.rb +54 -0
- data/spec/models/run_job_res_spec.rb +54 -0
- data/spec/models/signature_config_spec.rb +36 -0
- data/spec/models/split_action_spec.rb +60 -0
- data/spec/models/split_res_spec.rb +42 -0
- data/spec/models/split_spec.rb +54 -0
- data/spec/models/stamp_action_spec.rb +142 -0
- data/spec/models/stamp_res_spec.rb +42 -0
- data/spec/models/stamp_spec.rb +54 -0
- data/spec/models/storage_folder_spec.rb +58 -0
- data/spec/models/text_spec.rb +104 -0
- data/spec/models/transform_spec.rb +72 -0
- data/spec/models/translate_spec.rb +48 -0
- data/spec/models/user_fingerprint_spec.rb +48 -0
- data/spec/models/version_res_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- metadata +594 -0
@@ -0,0 +1,511 @@
|
|
1
|
+
=begin
|
2
|
+
#DmsApi
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Pdf4me
|
16
|
+
|
17
|
+
class Pdf4meDocument
|
18
|
+
attr_accessor :document_type
|
19
|
+
|
20
|
+
attr_accessor :blob_ref
|
21
|
+
|
22
|
+
attr_accessor :job_id
|
23
|
+
|
24
|
+
attr_accessor :ref_document_id
|
25
|
+
|
26
|
+
attr_accessor :ref_doc_action
|
27
|
+
|
28
|
+
attr_accessor :document_id
|
29
|
+
|
30
|
+
attr_accessor :user_id
|
31
|
+
|
32
|
+
attr_accessor :name
|
33
|
+
|
34
|
+
attr_accessor :ratio
|
35
|
+
|
36
|
+
attr_accessor :doc_status
|
37
|
+
|
38
|
+
attr_accessor :in_execution
|
39
|
+
|
40
|
+
attr_accessor :order
|
41
|
+
|
42
|
+
attr_accessor :show_doc
|
43
|
+
|
44
|
+
attr_accessor :doc_data
|
45
|
+
|
46
|
+
attr_accessor :thumbnail
|
47
|
+
|
48
|
+
attr_accessor :pages
|
49
|
+
|
50
|
+
attr_accessor :thumbnails
|
51
|
+
|
52
|
+
attr_accessor :doc_logs
|
53
|
+
|
54
|
+
attr_accessor :doc_metadata
|
55
|
+
|
56
|
+
attr_accessor :original_doc_metadata
|
57
|
+
|
58
|
+
attr_accessor :storage_provider_broker
|
59
|
+
|
60
|
+
attr_accessor :storage_provider
|
61
|
+
|
62
|
+
attr_accessor :storage_account_id
|
63
|
+
|
64
|
+
attr_accessor :storage_provider_id
|
65
|
+
|
66
|
+
attr_accessor :storage_provider_folder_id
|
67
|
+
|
68
|
+
class EnumAttributeValidator
|
69
|
+
attr_reader :datatype
|
70
|
+
attr_reader :allowable_values
|
71
|
+
|
72
|
+
def initialize(datatype, allowable_values)
|
73
|
+
@allowable_values = allowable_values.map do |value|
|
74
|
+
case datatype.to_s
|
75
|
+
when /Integer/i
|
76
|
+
value.to_i
|
77
|
+
when /Float/i
|
78
|
+
value.to_f
|
79
|
+
else
|
80
|
+
value
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
def valid?(value)
|
86
|
+
!value || allowable_values.include?(value)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
91
|
+
def self.attribute_map
|
92
|
+
{
|
93
|
+
:'document_type' => :'documentType',
|
94
|
+
:'blob_ref' => :'blobRef',
|
95
|
+
:'job_id' => :'jobId',
|
96
|
+
:'ref_document_id' => :'refDocumentId',
|
97
|
+
:'ref_doc_action' => :'refDocAction',
|
98
|
+
:'document_id' => :'documentId',
|
99
|
+
:'user_id' => :'userId',
|
100
|
+
:'name' => :'name',
|
101
|
+
:'ratio' => :'ratio',
|
102
|
+
:'doc_status' => :'docStatus',
|
103
|
+
:'in_execution' => :'inExecution',
|
104
|
+
:'order' => :'order',
|
105
|
+
:'show_doc' => :'showDoc',
|
106
|
+
:'doc_data' => :'docData',
|
107
|
+
:'thumbnail' => :'thumbnail',
|
108
|
+
:'pages' => :'pages',
|
109
|
+
:'thumbnails' => :'thumbnails',
|
110
|
+
:'doc_logs' => :'docLogs',
|
111
|
+
:'doc_metadata' => :'docMetadata',
|
112
|
+
:'original_doc_metadata' => :'originalDocMetadata',
|
113
|
+
:'storage_provider_broker' => :'storageProviderBroker',
|
114
|
+
:'storage_provider' => :'storageProvider',
|
115
|
+
:'storage_account_id' => :'storageAccountId',
|
116
|
+
:'storage_provider_id' => :'storageProviderId',
|
117
|
+
:'storage_provider_folder_id' => :'storageProviderFolderId'
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
# Attribute type mapping.
|
122
|
+
def self.swagger_types
|
123
|
+
{
|
124
|
+
:'document_type' => :'String',
|
125
|
+
:'blob_ref' => :'String',
|
126
|
+
:'job_id' => :'String',
|
127
|
+
:'ref_document_id' => :'String',
|
128
|
+
:'ref_doc_action' => :'DocAction',
|
129
|
+
:'document_id' => :'String',
|
130
|
+
:'user_id' => :'String',
|
131
|
+
:'name' => :'String',
|
132
|
+
:'ratio' => :'Float',
|
133
|
+
:'doc_status' => :'String',
|
134
|
+
:'in_execution' => :'BOOLEAN',
|
135
|
+
:'order' => :'Integer',
|
136
|
+
:'show_doc' => :'BOOLEAN',
|
137
|
+
:'doc_data' => :'String',
|
138
|
+
:'thumbnail' => :'String',
|
139
|
+
:'pages' => :'Array<Page>',
|
140
|
+
:'thumbnails' => :'Array<String>',
|
141
|
+
:'doc_logs' => :'Array<DocLog>',
|
142
|
+
:'doc_metadata' => :'DocMetadata',
|
143
|
+
:'original_doc_metadata' => :'DocMetadata',
|
144
|
+
:'storage_provider_broker' => :'String',
|
145
|
+
:'storage_provider' => :'String',
|
146
|
+
:'storage_account_id' => :'String',
|
147
|
+
:'storage_provider_id' => :'String',
|
148
|
+
:'storage_provider_folder_id' => :'String'
|
149
|
+
}
|
150
|
+
end
|
151
|
+
|
152
|
+
# Initializes the object
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
+
def initialize(attributes = {})
|
155
|
+
return unless attributes.is_a?(Hash)
|
156
|
+
|
157
|
+
# convert string to symbol for hash key
|
158
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
159
|
+
|
160
|
+
if attributes.has_key?(:'documentType')
|
161
|
+
self.document_type = attributes[:'documentType']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.has_key?(:'blobRef')
|
165
|
+
self.blob_ref = attributes[:'blobRef']
|
166
|
+
end
|
167
|
+
|
168
|
+
if attributes.has_key?(:'jobId')
|
169
|
+
self.job_id = attributes[:'jobId']
|
170
|
+
end
|
171
|
+
|
172
|
+
if attributes.has_key?(:'refDocumentId')
|
173
|
+
self.ref_document_id = attributes[:'refDocumentId']
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.has_key?(:'refDocAction')
|
177
|
+
self.ref_doc_action = attributes[:'refDocAction']
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.has_key?(:'documentId')
|
181
|
+
self.document_id = attributes[:'documentId']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.has_key?(:'userId')
|
185
|
+
self.user_id = attributes[:'userId']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.has_key?(:'name')
|
189
|
+
self.name = attributes[:'name']
|
190
|
+
end
|
191
|
+
|
192
|
+
if attributes.has_key?(:'ratio')
|
193
|
+
self.ratio = attributes[:'ratio']
|
194
|
+
end
|
195
|
+
|
196
|
+
if attributes.has_key?(:'docStatus')
|
197
|
+
self.doc_status = attributes[:'docStatus']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.has_key?(:'inExecution')
|
201
|
+
self.in_execution = attributes[:'inExecution']
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.has_key?(:'order')
|
205
|
+
self.order = attributes[:'order']
|
206
|
+
end
|
207
|
+
|
208
|
+
if attributes.has_key?(:'showDoc')
|
209
|
+
self.show_doc = attributes[:'showDoc']
|
210
|
+
end
|
211
|
+
|
212
|
+
if attributes.has_key?(:'docData')
|
213
|
+
self.doc_data = attributes[:'docData']
|
214
|
+
end
|
215
|
+
|
216
|
+
if attributes.has_key?(:'thumbnail')
|
217
|
+
self.thumbnail = attributes[:'thumbnail']
|
218
|
+
end
|
219
|
+
|
220
|
+
if attributes.has_key?(:'pages')
|
221
|
+
if (value = attributes[:'pages']).is_a?(Array)
|
222
|
+
self.pages = value
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.has_key?(:'thumbnails')
|
227
|
+
if (value = attributes[:'thumbnails']).is_a?(Array)
|
228
|
+
self.thumbnails = value
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
if attributes.has_key?(:'docLogs')
|
233
|
+
if (value = attributes[:'docLogs']).is_a?(Array)
|
234
|
+
self.doc_logs = value
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.has_key?(:'docMetadata')
|
239
|
+
self.doc_metadata = attributes[:'docMetadata']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.has_key?(:'originalDocMetadata')
|
243
|
+
self.original_doc_metadata = attributes[:'originalDocMetadata']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.has_key?(:'storageProviderBroker')
|
247
|
+
self.storage_provider_broker = attributes[:'storageProviderBroker']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.has_key?(:'storageProvider')
|
251
|
+
self.storage_provider = attributes[:'storageProvider']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes.has_key?(:'storageAccountId')
|
255
|
+
self.storage_account_id = attributes[:'storageAccountId']
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes.has_key?(:'storageProviderId')
|
259
|
+
self.storage_provider_id = attributes[:'storageProviderId']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes.has_key?(:'storageProviderFolderId')
|
263
|
+
self.storage_provider_folder_id = attributes[:'storageProviderFolderId']
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|
267
|
+
|
268
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
269
|
+
# @return Array for valid properties with the reasons
|
270
|
+
def list_invalid_properties
|
271
|
+
invalid_properties = Array.new
|
272
|
+
if !@doc_data.nil? && @doc_data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
273
|
+
invalid_properties.push("invalid value for 'doc_data', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.")
|
274
|
+
end
|
275
|
+
|
276
|
+
if !@thumbnail.nil? && @thumbnail !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
277
|
+
invalid_properties.push("invalid value for 'thumbnail', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.")
|
278
|
+
end
|
279
|
+
|
280
|
+
return invalid_properties
|
281
|
+
end
|
282
|
+
|
283
|
+
# Check to see if the all the properties in the model are valid
|
284
|
+
# @return true if the model is valid
|
285
|
+
def valid?
|
286
|
+
document_type_validator = EnumAttributeValidator.new('String', ["uploadDoc", "converted", "stamped", "ocr", "split", "optimize", "merge"])
|
287
|
+
return false unless document_type_validator.valid?(@document_type)
|
288
|
+
doc_status_validator = EnumAttributeValidator.new('String', ["undef", "error", "finished", "uploaded", "loading", "loaded", "converting", "converted", "optimizing", "optimized", "doingOcr", "ocred", "doingZip", "stamping", "stamped", "processing"])
|
289
|
+
return false unless doc_status_validator.valid?(@doc_status)
|
290
|
+
return false if !@doc_data.nil? && @doc_data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
291
|
+
return false if !@thumbnail.nil? && @thumbnail !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
292
|
+
storage_provider_broker_validator = EnumAttributeValidator.new('String', ["undef", "kloudless"])
|
293
|
+
return false unless storage_provider_broker_validator.valid?(@storage_provider_broker)
|
294
|
+
storage_provider_validator = EnumAttributeValidator.new('String', ["undef", "local", "url", "oneDrive", "dropbox", "googleDrive", "kloudless"])
|
295
|
+
return false unless storage_provider_validator.valid?(@storage_provider)
|
296
|
+
return true
|
297
|
+
end
|
298
|
+
|
299
|
+
# Custom attribute writer method checking allowed values (enum).
|
300
|
+
# @param [Object] document_type Object to be assigned
|
301
|
+
def document_type=(document_type)
|
302
|
+
validator = EnumAttributeValidator.new('String', ["uploadDoc", "converted", "stamped", "ocr", "split", "optimize", "merge"])
|
303
|
+
unless validator.valid?(document_type)
|
304
|
+
fail ArgumentError, "invalid value for 'document_type', must be one of #{validator.allowable_values}."
|
305
|
+
end
|
306
|
+
@document_type = document_type
|
307
|
+
end
|
308
|
+
|
309
|
+
# Custom attribute writer method checking allowed values (enum).
|
310
|
+
# @param [Object] doc_status Object to be assigned
|
311
|
+
def doc_status=(doc_status)
|
312
|
+
validator = EnumAttributeValidator.new('String', ["undef", "error", "finished", "uploaded", "loading", "loaded", "converting", "converted", "optimizing", "optimized", "doingOcr", "ocred", "doingZip", "stamping", "stamped", "processing"])
|
313
|
+
unless validator.valid?(doc_status)
|
314
|
+
fail ArgumentError, "invalid value for 'doc_status', must be one of #{validator.allowable_values}."
|
315
|
+
end
|
316
|
+
@doc_status = doc_status
|
317
|
+
end
|
318
|
+
|
319
|
+
# Custom attribute writer method with validation
|
320
|
+
# @param [Object] doc_data Value to be assigned
|
321
|
+
def doc_data=(doc_data)
|
322
|
+
|
323
|
+
if !doc_data.nil? && doc_data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
324
|
+
fail ArgumentError, "invalid value for 'doc_data', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."
|
325
|
+
end
|
326
|
+
|
327
|
+
@doc_data = doc_data
|
328
|
+
end
|
329
|
+
|
330
|
+
# Custom attribute writer method with validation
|
331
|
+
# @param [Object] thumbnail Value to be assigned
|
332
|
+
def thumbnail=(thumbnail)
|
333
|
+
|
334
|
+
if !thumbnail.nil? && thumbnail !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
|
335
|
+
fail ArgumentError, "invalid value for 'thumbnail', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."
|
336
|
+
end
|
337
|
+
|
338
|
+
@thumbnail = thumbnail
|
339
|
+
end
|
340
|
+
|
341
|
+
# Custom attribute writer method checking allowed values (enum).
|
342
|
+
# @param [Object] storage_provider_broker Object to be assigned
|
343
|
+
def storage_provider_broker=(storage_provider_broker)
|
344
|
+
validator = EnumAttributeValidator.new('String', ["undef", "kloudless"])
|
345
|
+
unless validator.valid?(storage_provider_broker)
|
346
|
+
fail ArgumentError, "invalid value for 'storage_provider_broker', must be one of #{validator.allowable_values}."
|
347
|
+
end
|
348
|
+
@storage_provider_broker = storage_provider_broker
|
349
|
+
end
|
350
|
+
|
351
|
+
# Custom attribute writer method checking allowed values (enum).
|
352
|
+
# @param [Object] storage_provider Object to be assigned
|
353
|
+
def storage_provider=(storage_provider)
|
354
|
+
validator = EnumAttributeValidator.new('String', ["undef", "local", "url", "oneDrive", "dropbox", "googleDrive", "kloudless"])
|
355
|
+
unless validator.valid?(storage_provider)
|
356
|
+
fail ArgumentError, "invalid value for 'storage_provider', must be one of #{validator.allowable_values}."
|
357
|
+
end
|
358
|
+
@storage_provider = storage_provider
|
359
|
+
end
|
360
|
+
|
361
|
+
# Checks equality by comparing each attribute.
|
362
|
+
# @param [Object] Object to be compared
|
363
|
+
def ==(o)
|
364
|
+
return true if self.equal?(o)
|
365
|
+
self.class == o.class &&
|
366
|
+
document_type == o.document_type &&
|
367
|
+
blob_ref == o.blob_ref &&
|
368
|
+
job_id == o.job_id &&
|
369
|
+
ref_document_id == o.ref_document_id &&
|
370
|
+
ref_doc_action == o.ref_doc_action &&
|
371
|
+
document_id == o.document_id &&
|
372
|
+
user_id == o.user_id &&
|
373
|
+
name == o.name &&
|
374
|
+
ratio == o.ratio &&
|
375
|
+
doc_status == o.doc_status &&
|
376
|
+
in_execution == o.in_execution &&
|
377
|
+
order == o.order &&
|
378
|
+
show_doc == o.show_doc &&
|
379
|
+
doc_data == o.doc_data &&
|
380
|
+
thumbnail == o.thumbnail &&
|
381
|
+
pages == o.pages &&
|
382
|
+
thumbnails == o.thumbnails &&
|
383
|
+
doc_logs == o.doc_logs &&
|
384
|
+
doc_metadata == o.doc_metadata &&
|
385
|
+
original_doc_metadata == o.original_doc_metadata &&
|
386
|
+
storage_provider_broker == o.storage_provider_broker &&
|
387
|
+
storage_provider == o.storage_provider &&
|
388
|
+
storage_account_id == o.storage_account_id &&
|
389
|
+
storage_provider_id == o.storage_provider_id &&
|
390
|
+
storage_provider_folder_id == o.storage_provider_folder_id
|
391
|
+
end
|
392
|
+
|
393
|
+
# @see the `==` method
|
394
|
+
# @param [Object] Object to be compared
|
395
|
+
def eql?(o)
|
396
|
+
self == o
|
397
|
+
end
|
398
|
+
|
399
|
+
# Calculates hash code according to all attributes.
|
400
|
+
# @return [Fixnum] Hash code
|
401
|
+
def hash
|
402
|
+
[document_type, blob_ref, job_id, ref_document_id, ref_doc_action, document_id, user_id, name, ratio, doc_status, in_execution, order, show_doc, doc_data, thumbnail, pages, thumbnails, doc_logs, doc_metadata, original_doc_metadata, storage_provider_broker, storage_provider, storage_account_id, storage_provider_id, storage_provider_folder_id].hash
|
403
|
+
end
|
404
|
+
|
405
|
+
# Builds the object from hash
|
406
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
407
|
+
# @return [Object] Returns the model itself
|
408
|
+
def build_from_hash(attributes)
|
409
|
+
return nil unless attributes.is_a?(Hash)
|
410
|
+
self.class.swagger_types.each_pair do |key, type|
|
411
|
+
if type =~ /\AArray<(.*)>/i
|
412
|
+
# check to ensure the input is an array given that the the attribute
|
413
|
+
# is documented as an array but the input is not
|
414
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
415
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
416
|
+
end
|
417
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
418
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
419
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
420
|
+
end
|
421
|
+
|
422
|
+
self
|
423
|
+
end
|
424
|
+
|
425
|
+
# Deserializes the data based on type
|
426
|
+
# @param string type Data type
|
427
|
+
# @param string value Value to be deserialized
|
428
|
+
# @return [Object] Deserialized data
|
429
|
+
def _deserialize(type, value)
|
430
|
+
case type.to_sym
|
431
|
+
when :DateTime
|
432
|
+
DateTime.parse(value)
|
433
|
+
when :Date
|
434
|
+
Date.parse(value)
|
435
|
+
when :String
|
436
|
+
value.to_s
|
437
|
+
when :Integer
|
438
|
+
value.to_i
|
439
|
+
when :Float
|
440
|
+
value.to_f
|
441
|
+
when :BOOLEAN
|
442
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
443
|
+
true
|
444
|
+
else
|
445
|
+
false
|
446
|
+
end
|
447
|
+
when :Object
|
448
|
+
# generic object (usually a Hash), return directly
|
449
|
+
value
|
450
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
451
|
+
inner_type = Regexp.last_match[:inner_type]
|
452
|
+
value.map { |v| _deserialize(inner_type, v) }
|
453
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
454
|
+
k_type = Regexp.last_match[:k_type]
|
455
|
+
v_type = Regexp.last_match[:v_type]
|
456
|
+
{}.tap do |hash|
|
457
|
+
value.each do |k, v|
|
458
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
459
|
+
end
|
460
|
+
end
|
461
|
+
else # model
|
462
|
+
temp_model = Pdf4me.const_get(type).new
|
463
|
+
temp_model.build_from_hash(value)
|
464
|
+
end
|
465
|
+
end
|
466
|
+
|
467
|
+
# Returns the string representation of the object
|
468
|
+
# @return [String] String presentation of the object
|
469
|
+
def to_s
|
470
|
+
to_hash.to_s
|
471
|
+
end
|
472
|
+
|
473
|
+
# to_body is an alias to to_hash (backward compatibility)
|
474
|
+
# @return [Hash] Returns the object in the form of hash
|
475
|
+
def to_body
|
476
|
+
to_hash
|
477
|
+
end
|
478
|
+
|
479
|
+
# Returns the object in the form of hash
|
480
|
+
# @return [Hash] Returns the object in the form of hash
|
481
|
+
def to_hash
|
482
|
+
hash = {}
|
483
|
+
self.class.attribute_map.each_pair do |attr, param|
|
484
|
+
value = self.send(attr)
|
485
|
+
next if value.nil?
|
486
|
+
hash[param] = _to_hash(value)
|
487
|
+
end
|
488
|
+
hash
|
489
|
+
end
|
490
|
+
|
491
|
+
# Outputs non-array value in the form of hash
|
492
|
+
# For object, use to_hash. Otherwise, just return the value
|
493
|
+
# @param [Object] value Any valid value
|
494
|
+
# @return [Hash] Returns the value in the form of hash
|
495
|
+
def _to_hash(value)
|
496
|
+
if value.is_a?(Array)
|
497
|
+
value.compact.map{ |v| _to_hash(v) }
|
498
|
+
elsif value.is_a?(Hash)
|
499
|
+
{}.tap do |hash|
|
500
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
501
|
+
end
|
502
|
+
elsif value.respond_to? :to_hash
|
503
|
+
value.to_hash
|
504
|
+
else
|
505
|
+
value
|
506
|
+
end
|
507
|
+
end
|
508
|
+
|
509
|
+
end
|
510
|
+
|
511
|
+
end
|