aspose_words_cloud 24.8.0 → 24.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aspose_words_cloud/api/words_api.rb +260 -0
- data/lib/aspose_words_cloud/models/azw3_save_options_data.rb +15 -1
- data/lib/aspose_words_cloud/models/digital_signature_details.rb +218 -0
- data/lib/aspose_words_cloud/models/epub_save_options_data.rb +15 -1
- data/lib/aspose_words_cloud/models/html_save_options_data.rb +15 -1
- data/lib/aspose_words_cloud/models/mhtml_save_options_data.rb +15 -1
- data/lib/aspose_words_cloud/models/open_xps_save_options_data.rb +14 -1
- data/lib/aspose_words_cloud/models/pdf_save_options_data.rb +13 -1
- data/lib/aspose_words_cloud/models/requests/execute_mail_merge_online_request.rb +8 -1
- data/lib/aspose_words_cloud/models/requests/execute_mail_merge_request.rb +8 -1
- data/lib/aspose_words_cloud/models/requests/get_signatures_online_request.rb +179 -0
- data/lib/aspose_words_cloud/models/requests/get_signatures_request.rb +178 -0
- data/lib/aspose_words_cloud/models/requests/remove_all_signatures_online_request.rb +186 -0
- data/lib/aspose_words_cloud/models/requests/remove_all_signatures_request.rb +185 -0
- data/lib/aspose_words_cloud/models/requests/sign_document_online_request.rb +208 -0
- data/lib/aspose_words_cloud/models/requests/sign_document_request.rb +207 -0
- data/lib/aspose_words_cloud/models/responses/remove_all_signatures_online_response.rb +47 -0
- data/lib/aspose_words_cloud/models/responses/sign_document_online_response.rb +47 -0
- data/lib/aspose_words_cloud/models/sign_options.rb +254 -0
- data/lib/aspose_words_cloud/models/signature.rb +267 -0
- data/lib/aspose_words_cloud/models/signature_collection_response.rb +236 -0
- data/lib/aspose_words_cloud/models/xaml_flow_pack_save_options_data.rb +15 -1
- data/lib/aspose_words_cloud/models/xaml_flow_save_options_data.rb +15 -1
- data/lib/aspose_words_cloud/models/xps_save_options_data.rb +14 -1
- data/lib/aspose_words_cloud/version.rb +1 -1
- data/lib/aspose_words_cloud.rb +10 -0
- metadata +14 -2
@@ -0,0 +1,254 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="sign_options.rb">
|
3
|
+
# Copyright (c) 2024 Aspose.Words for Cloud
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
11
|
+
# furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in all
|
14
|
+
# copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
# SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ------------------------------------------------------------------------------------
|
25
|
+
|
26
|
+
require 'date'
|
27
|
+
|
28
|
+
module AsposeWordsCloud
|
29
|
+
|
30
|
+
# Container class for digital signature options.
|
31
|
+
class SignOptions
|
32
|
+
# Gets or sets comments on the digital signature. Default value is empty string.
|
33
|
+
attr_accessor :comments
|
34
|
+
|
35
|
+
# Gets or sets the password to decrypt source document. Default value is empty string.
|
36
|
+
attr_accessor :decryption_password
|
37
|
+
|
38
|
+
# Gets or sets the class Guid of the signature cryptography provider. Default value is Empty (all zeroes) Guid.
|
39
|
+
attr_accessor :provider_id
|
40
|
+
|
41
|
+
# Gets or sets user defined signature line Guid. Default value is Empty (all zeroes) Guid.
|
42
|
+
attr_accessor :signature_line_id
|
43
|
+
|
44
|
+
# Gets or sets the image that will be shown in associated SignatureLine. Default value is empty string.
|
45
|
+
attr_accessor :signature_line_image_filename
|
46
|
+
|
47
|
+
# Gets or sets the date of signing. Default value is current time (Now).
|
48
|
+
attr_accessor :sign_time
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
50
|
+
def self.attribute_map
|
51
|
+
{
|
52
|
+
:'comments' => :'Comments',
|
53
|
+
:'decryption_password' => :'DecryptionPassword',
|
54
|
+
:'provider_id' => :'ProviderId',
|
55
|
+
:'signature_line_id' => :'SignatureLineId',
|
56
|
+
:'signature_line_image_filename' => :'SignatureLineImageFilename',
|
57
|
+
:'sign_time' => :'SignTime'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute type mapping.
|
62
|
+
def self.swagger_types
|
63
|
+
{
|
64
|
+
:'comments' => :'String',
|
65
|
+
:'decryption_password' => :'String',
|
66
|
+
:'provider_id' => :'String',
|
67
|
+
:'signature_line_id' => :'String',
|
68
|
+
:'signature_line_image_filename' => :'String',
|
69
|
+
:'sign_time' => :'DateTime'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# Initializes the object
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
75
|
+
def initialize(attributes = {})
|
76
|
+
return unless attributes.is_a?(Hash)
|
77
|
+
|
78
|
+
# convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
80
|
+
|
81
|
+
if attributes.key?(:'Comments')
|
82
|
+
self.comments = attributes[:'Comments']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'DecryptionPassword')
|
86
|
+
self.decryption_password = attributes[:'DecryptionPassword']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'ProviderId')
|
90
|
+
self.provider_id = attributes[:'ProviderId']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'SignatureLineId')
|
94
|
+
self.signature_line_id = attributes[:'SignatureLineId']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'SignatureLineImageFilename')
|
98
|
+
self.signature_line_image_filename = attributes[:'SignatureLineImageFilename']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'SignTime')
|
102
|
+
self.sign_time = attributes[:'SignTime']
|
103
|
+
end
|
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
|
+
return true
|
110
|
+
end
|
111
|
+
|
112
|
+
# Checks equality by comparing each attribute.
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def ==(other)
|
115
|
+
return true if self.equal?(other)
|
116
|
+
self.class == other.class &&
|
117
|
+
comments == other.comments &&
|
118
|
+
decryption_password == other.decryption_password &&
|
119
|
+
provider_id == other.provider_id &&
|
120
|
+
signature_line_id == other.signature_line_id &&
|
121
|
+
signature_line_image_filename == other.signature_line_image_filename &&
|
122
|
+
sign_time == other.sign_time
|
123
|
+
end
|
124
|
+
|
125
|
+
# @see the `==` method
|
126
|
+
# @param [Object] Object to be compared
|
127
|
+
def eql?(other)
|
128
|
+
self == other
|
129
|
+
end
|
130
|
+
|
131
|
+
# Calculates hash code according to all attributes.
|
132
|
+
# @return [Fixnum] Hash code
|
133
|
+
def hash
|
134
|
+
[comments, decryption_password, provider_id, signature_line_id, signature_line_image_filename, sign_time].hash
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def build_from_hash(attributes)
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
142
|
+
self.class.swagger_types.each_pair do |key, type|
|
143
|
+
if type =~ /\AArray<(.*)>/i
|
144
|
+
# check to ensure the input is an array given that the the attribute
|
145
|
+
# is documented as an array but the input is not
|
146
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
147
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
148
|
+
end
|
149
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
150
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
151
|
+
end
|
152
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
153
|
+
end
|
154
|
+
|
155
|
+
self
|
156
|
+
end
|
157
|
+
|
158
|
+
# Deserializes the data based on type
|
159
|
+
# @param string type Data type
|
160
|
+
# @param string value Value to be deserialized
|
161
|
+
# @return [Object] Deserialized data
|
162
|
+
def _deserialize(type, value)
|
163
|
+
case type.to_sym
|
164
|
+
when :DateTime
|
165
|
+
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
166
|
+
when :Date
|
167
|
+
Time.at(/\d/.match(value)[0].to_f).to_date
|
168
|
+
when :String
|
169
|
+
value.to_s
|
170
|
+
when :Integer
|
171
|
+
value.to_i
|
172
|
+
when :Float
|
173
|
+
value.to_f
|
174
|
+
when :BOOLEAN
|
175
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
176
|
+
true
|
177
|
+
else
|
178
|
+
false
|
179
|
+
end
|
180
|
+
when :Object
|
181
|
+
# generic object (usually a Hash), return directly
|
182
|
+
value
|
183
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
184
|
+
inner_type = Regexp.last_match[:inner_type]
|
185
|
+
value.map { |v| _deserialize(inner_type, v) }
|
186
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
187
|
+
k_type = Regexp.last_match[:k_type]
|
188
|
+
v_type = Regexp.last_match[:v_type]
|
189
|
+
{}.tap do |hash|
|
190
|
+
value.each do |k, v|
|
191
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
192
|
+
end
|
193
|
+
end
|
194
|
+
else
|
195
|
+
# model
|
196
|
+
if value[:'$type']
|
197
|
+
type = value[:'$type'][0..-4]
|
198
|
+
end
|
199
|
+
|
200
|
+
temp_model = AsposeWordsCloud.const_get(type).new
|
201
|
+
temp_model.build_from_hash(value)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the string representation of the object
|
206
|
+
# @return [String] String presentation of the object
|
207
|
+
def to_s
|
208
|
+
to_hash.to_s
|
209
|
+
end
|
210
|
+
|
211
|
+
# to_body is an alias to to_hash (backward compatibility)
|
212
|
+
# @return [Hash] Returns the object in the form of hash
|
213
|
+
def to_body
|
214
|
+
to_hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Returns the object in the form of hash
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_hash
|
220
|
+
hash = {}
|
221
|
+
self.class.attribute_map.each_pair do |attr, param|
|
222
|
+
value = self.send(attr)
|
223
|
+
next if value.nil?
|
224
|
+
hash[param] = _to_hash(value)
|
225
|
+
end
|
226
|
+
hash
|
227
|
+
end
|
228
|
+
|
229
|
+
# Outputs non-array value in the form of hash
|
230
|
+
# For object, use to_hash. Otherwise, just return the value
|
231
|
+
# @param [Object] value Any valid value
|
232
|
+
# @return [Hash] Returns the value in the form of hash
|
233
|
+
def _to_hash(value)
|
234
|
+
if value.is_a?(Array)
|
235
|
+
value.compact.map { |v| _to_hash(v) }
|
236
|
+
elsif value.is_a?(Hash)
|
237
|
+
{}.tap do |hash|
|
238
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
239
|
+
end
|
240
|
+
elsif value.respond_to? :to_hash
|
241
|
+
value.to_hash
|
242
|
+
else
|
243
|
+
value
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
def collectFilesContent(resultFilesContent)
|
248
|
+
end
|
249
|
+
|
250
|
+
def validate()
|
251
|
+
end
|
252
|
+
|
253
|
+
end
|
254
|
+
end
|
@@ -0,0 +1,267 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="signature.rb">
|
3
|
+
# Copyright (c) 2024 Aspose.Words for Cloud
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
11
|
+
# furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in all
|
14
|
+
# copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
# SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ------------------------------------------------------------------------------------
|
25
|
+
|
26
|
+
require 'date'
|
27
|
+
|
28
|
+
module AsposeWordsCloud
|
29
|
+
|
30
|
+
# The REST response with a document signature collection.
|
31
|
+
# This response is returned by the Service when handling any "https://api.aspose.cloud/v4.0/words/Test.doc/signatures" REST API requests.
|
32
|
+
class Signature
|
33
|
+
# Gets or sets the signing purpose comment.
|
34
|
+
attr_accessor :comments
|
35
|
+
|
36
|
+
# Gets or sets the subject distinguished name of the certificate isuuer.
|
37
|
+
attr_accessor :issuer_name
|
38
|
+
|
39
|
+
# Gets or sets a value indicating whether this digital signature is valid.
|
40
|
+
attr_accessor :is_valid
|
41
|
+
|
42
|
+
# Gets or sets the type of the digital signature.
|
43
|
+
attr_accessor :signature_type
|
44
|
+
|
45
|
+
# Gets or sets an array of bytes representing a signature value as base64 string.
|
46
|
+
attr_accessor :signature_value
|
47
|
+
|
48
|
+
# Gets or sets the time the document was signed.
|
49
|
+
attr_accessor :sign_time
|
50
|
+
|
51
|
+
# Gets or sets the subject distinguished name of the certificate that was used to sign the document.
|
52
|
+
attr_accessor :subject_name
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
54
|
+
def self.attribute_map
|
55
|
+
{
|
56
|
+
:'comments' => :'Comments',
|
57
|
+
:'issuer_name' => :'IssuerName',
|
58
|
+
:'is_valid' => :'IsValid',
|
59
|
+
:'signature_type' => :'SignatureType',
|
60
|
+
:'signature_value' => :'SignatureValue',
|
61
|
+
:'sign_time' => :'SignTime',
|
62
|
+
:'subject_name' => :'SubjectName'
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# Attribute type mapping.
|
67
|
+
def self.swagger_types
|
68
|
+
{
|
69
|
+
:'comments' => :'String',
|
70
|
+
:'issuer_name' => :'String',
|
71
|
+
:'is_valid' => :'BOOLEAN',
|
72
|
+
:'signature_type' => :'String',
|
73
|
+
:'signature_value' => :'String',
|
74
|
+
:'sign_time' => :'DateTime',
|
75
|
+
:'subject_name' => :'String'
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
# Initializes the object
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
81
|
+
def initialize(attributes = {})
|
82
|
+
return unless attributes.is_a?(Hash)
|
83
|
+
|
84
|
+
# convert string to symbol for hash key
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
86
|
+
|
87
|
+
if attributes.key?(:'Comments')
|
88
|
+
self.comments = attributes[:'Comments']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.key?(:'IssuerName')
|
92
|
+
self.issuer_name = attributes[:'IssuerName']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'IsValid')
|
96
|
+
self.is_valid = attributes[:'IsValid']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'SignatureType')
|
100
|
+
self.signature_type = attributes[:'SignatureType']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'SignatureValue')
|
104
|
+
self.signature_value = attributes[:'SignatureValue']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'SignTime')
|
108
|
+
self.sign_time = attributes[:'SignTime']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'SubjectName')
|
112
|
+
self.subject_name = attributes[:'SubjectName']
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
# Check to see if the all the properties in the model are valid
|
117
|
+
# @return true if the model is valid
|
118
|
+
def valid?
|
119
|
+
return true
|
120
|
+
end
|
121
|
+
|
122
|
+
# Checks equality by comparing each attribute.
|
123
|
+
# @param [Object] Object to be compared
|
124
|
+
def ==(other)
|
125
|
+
return true if self.equal?(other)
|
126
|
+
self.class == other.class &&
|
127
|
+
comments == other.comments &&
|
128
|
+
issuer_name == other.issuer_name &&
|
129
|
+
is_valid == other.is_valid &&
|
130
|
+
signature_type == other.signature_type &&
|
131
|
+
signature_value == other.signature_value &&
|
132
|
+
sign_time == other.sign_time &&
|
133
|
+
subject_name == other.subject_name
|
134
|
+
end
|
135
|
+
|
136
|
+
# @see the `==` method
|
137
|
+
# @param [Object] Object to be compared
|
138
|
+
def eql?(other)
|
139
|
+
self == other
|
140
|
+
end
|
141
|
+
|
142
|
+
# Calculates hash code according to all attributes.
|
143
|
+
# @return [Fixnum] Hash code
|
144
|
+
def hash
|
145
|
+
[comments, issuer_name, is_valid, signature_type, signature_value, sign_time, subject_name].hash
|
146
|
+
end
|
147
|
+
|
148
|
+
# Builds the object from hash
|
149
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
150
|
+
# @return [Object] Returns the model itself
|
151
|
+
def build_from_hash(attributes)
|
152
|
+
return nil unless attributes.is_a?(Hash)
|
153
|
+
self.class.swagger_types.each_pair do |key, type|
|
154
|
+
if type =~ /\AArray<(.*)>/i
|
155
|
+
# check to ensure the input is an array given that the the attribute
|
156
|
+
# is documented as an array but the input is not
|
157
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
158
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
159
|
+
end
|
160
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
161
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
162
|
+
end
|
163
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
164
|
+
end
|
165
|
+
|
166
|
+
self
|
167
|
+
end
|
168
|
+
|
169
|
+
# Deserializes the data based on type
|
170
|
+
# @param string type Data type
|
171
|
+
# @param string value Value to be deserialized
|
172
|
+
# @return [Object] Deserialized data
|
173
|
+
def _deserialize(type, value)
|
174
|
+
case type.to_sym
|
175
|
+
when :DateTime
|
176
|
+
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
177
|
+
when :Date
|
178
|
+
Time.at(/\d/.match(value)[0].to_f).to_date
|
179
|
+
when :String
|
180
|
+
value.to_s
|
181
|
+
when :Integer
|
182
|
+
value.to_i
|
183
|
+
when :Float
|
184
|
+
value.to_f
|
185
|
+
when :BOOLEAN
|
186
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
187
|
+
true
|
188
|
+
else
|
189
|
+
false
|
190
|
+
end
|
191
|
+
when :Object
|
192
|
+
# generic object (usually a Hash), return directly
|
193
|
+
value
|
194
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
195
|
+
inner_type = Regexp.last_match[:inner_type]
|
196
|
+
value.map { |v| _deserialize(inner_type, v) }
|
197
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
198
|
+
k_type = Regexp.last_match[:k_type]
|
199
|
+
v_type = Regexp.last_match[:v_type]
|
200
|
+
{}.tap do |hash|
|
201
|
+
value.each do |k, v|
|
202
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
203
|
+
end
|
204
|
+
end
|
205
|
+
else
|
206
|
+
# model
|
207
|
+
if value[:'$type']
|
208
|
+
type = value[:'$type'][0..-4]
|
209
|
+
end
|
210
|
+
|
211
|
+
temp_model = AsposeWordsCloud.const_get(type).new
|
212
|
+
temp_model.build_from_hash(value)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# Returns the string representation of the object
|
217
|
+
# @return [String] String presentation of the object
|
218
|
+
def to_s
|
219
|
+
to_hash.to_s
|
220
|
+
end
|
221
|
+
|
222
|
+
# to_body is an alias to to_hash (backward compatibility)
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
224
|
+
def to_body
|
225
|
+
to_hash
|
226
|
+
end
|
227
|
+
|
228
|
+
# Returns the object in the form of hash
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
230
|
+
def to_hash
|
231
|
+
hash = {}
|
232
|
+
self.class.attribute_map.each_pair do |attr, param|
|
233
|
+
value = self.send(attr)
|
234
|
+
next if value.nil?
|
235
|
+
hash[param] = _to_hash(value)
|
236
|
+
end
|
237
|
+
hash
|
238
|
+
end
|
239
|
+
|
240
|
+
# Outputs non-array value in the form of hash
|
241
|
+
# For object, use to_hash. Otherwise, just return the value
|
242
|
+
# @param [Object] value Any valid value
|
243
|
+
# @return [Hash] Returns the value in the form of hash
|
244
|
+
def _to_hash(value)
|
245
|
+
if value.is_a?(Array)
|
246
|
+
value.compact.map { |v| _to_hash(v) }
|
247
|
+
elsif value.is_a?(Hash)
|
248
|
+
{}.tap do |hash|
|
249
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
250
|
+
end
|
251
|
+
elsif value.respond_to? :to_hash
|
252
|
+
value.to_hash
|
253
|
+
else
|
254
|
+
value
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
def collectFilesContent(resultFilesContent)
|
259
|
+
end
|
260
|
+
|
261
|
+
def validate()
|
262
|
+
raise ArgumentError, 'Property is_valid in Signature is required.' if self.is_valid.nil?
|
263
|
+
raise ArgumentError, 'Property sign_time in Signature is required.' if self.sign_time.nil?
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|
267
|
+
end
|