aspose_cad_cloud 20.11 → 24.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aspose_cad_cloud/api/cad_api.rb +2778 -392
- data/lib/aspose_cad_cloud/configuration.rb +8 -1
- data/lib/aspose_cad_cloud/models/bitmap_compression.rb +27 -0
- data/lib/aspose_cad_cloud/models/bmp_options_dto.rb +2 -2
- data/lib/aspose_cad_cloud/models/cad_draw_type_mode.rb +21 -0
- data/lib/aspose_cad_cloud/models/cad_response.rb +48 -8
- data/lib/aspose_cad_cloud/models/{cff2_properties.rb → cf2_properties.rb} +3 -3
- data/lib/aspose_cad_cloud/models/cgm_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/color_modes.rb +27 -0
- data/lib/aspose_cad_cloud/models/compression_method.rb +23 -0
- data/lib/aspose_cad_cloud/models/dicom_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/draco_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/dwf_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/dxf_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/{error.rb → error_model.rb} +2 -2
- data/lib/aspose_cad_cloud/models/fbx_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/fbx_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/files_upload_result.rb +1 -1
- data/lib/aspose_cad_cloud/models/glb_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/gltf_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/interpolation_mode.rb +28 -0
- data/lib/aspose_cad_cloud/models/jpeg2000_codec.rb +22 -0
- data/lib/aspose_cad_cloud/models/jpeg_compression_color_mode.rb +24 -0
- data/lib/aspose_cad_cloud/models/jpeg_compression_mode.rb +23 -0
- data/lib/aspose_cad_cloud/models/line_cap.rb +30 -0
- data/lib/aspose_cad_cloud/models/obj_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/obj_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/pdf_compliance.rb +22 -0
- data/lib/aspose_cad_cloud/models/pdf_digital_signature_details_core_dto.rb +294 -0
- data/lib/aspose_cad_cloud/models/pdf_digital_signature_hash_algorithm_core.rb +24 -0
- data/lib/aspose_cad_cloud/models/{pdf_document_options.rb → pdf_document_options_dto.rb} +17 -7
- data/lib/aspose_cad_cloud/models/pdf_options_dto.rb +1 -1
- data/lib/aspose_cad_cloud/models/plt_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/png_color_type.rb +24 -0
- data/lib/aspose_cad_cloud/models/png_filter_type.rb +25 -0
- data/lib/aspose_cad_cloud/models/requests/ConvertRequest.rb +53 -0
- data/lib/aspose_cad_cloud/models/requests/EditMetadataRequest.rb +45 -0
- data/lib/aspose_cad_cloud/models/requests/ExtractMetadataRequest.rb +49 -0
- data/lib/aspose_cad_cloud/models/requests/ExtractTextRequest.rb +45 -0
- data/lib/aspose_cad_cloud/models/requests/PaperToCadRequest.rb +49 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingCgmRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingDicomRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingDracoRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingDwfRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingDxfRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingFbxRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingGlbRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingGltfRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingObjRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingStpRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingThreeDsRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingU3dRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingWebpRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingCgmRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingDicomRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingDracoRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingDwfRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingDxfRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingFbxRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingGlbRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingGltfRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingObjRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingStpRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingThreeDsRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingU3dRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingWebpRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutEditMetadataRequest.rb +49 -0
- data/lib/aspose_cad_cloud/models/requests/ViewerRequest.rb +49 -0
- data/lib/aspose_cad_cloud/models/requests/WatermarkRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/rotate_flip_type.rb +35 -0
- data/lib/aspose_cad_cloud/models/smoothing_mode.rb +25 -0
- data/lib/aspose_cad_cloud/models/stp_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/stp_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/svg_color_mode.rb +24 -0
- data/lib/aspose_cad_cloud/models/text_rendering_hint.rb +25 -0
- data/lib/aspose_cad_cloud/models/three_ds_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/tiff_byte_order.rb +21 -0
- data/lib/aspose_cad_cloud/models/tiff_compressions.rb +43 -0
- data/lib/aspose_cad_cloud/models/tiff_expected_format.rb +35 -0
- data/lib/aspose_cad_cloud/models/tiff_photometrics.rb +31 -0
- data/lib/aspose_cad_cloud/models/u3d_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/unit_type.rb +41 -0
- data/lib/aspose_cad_cloud/models/webp_options_dto.rb +281 -0
- data/lib/aspose_cad_cloud/version.rb +1 -1
- data/lib/aspose_cad_cloud.rb +43 -3
- metadata +100 -12
@@ -0,0 +1,294 @@
|
|
1
|
+
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
module AsposeCadCloud
|
5
|
+
#
|
6
|
+
# --------------------------------------------------------------------------------------------------------------------
|
7
|
+
# <copyright company="Aspose" file="PdfDigitalSignatureDetailsCoreDTO.rb">
|
8
|
+
# Copyright (c) 2017 Aspose.CAD Cloud
|
9
|
+
# </copyright>
|
10
|
+
# <summary>
|
11
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
12
|
+
# of this software and associated documentation files (the "Software"), to deal
|
13
|
+
# in the Software without restriction, including without limitation the rights
|
14
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
15
|
+
# copies of the Software, and to permit persons to whom the Software is
|
16
|
+
# furnished to do so, subject to the following conditions:
|
17
|
+
#
|
18
|
+
# The above copyright notice and this permission notice shall be included in all
|
19
|
+
# copies or substantial portions of the Software.
|
20
|
+
#
|
21
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
26
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
27
|
+
# SOFTWARE.
|
28
|
+
# </summary>
|
29
|
+
# --------------------------------------------------------------------------------------------------------------------
|
30
|
+
#
|
31
|
+
|
32
|
+
# Contains details for a PDF digital signature.
|
33
|
+
class PdfDigitalSignatureDetailsCoreDTO
|
34
|
+
# A signing certificate in base64 format that contains a certificate of type X509Certificate2.
|
35
|
+
attr_accessor :certificate
|
36
|
+
|
37
|
+
# The reason of signing.
|
38
|
+
attr_accessor :reason
|
39
|
+
|
40
|
+
# Location of signing.
|
41
|
+
attr_accessor :location
|
42
|
+
|
43
|
+
# Date of signing.
|
44
|
+
attr_accessor :signature_date
|
45
|
+
|
46
|
+
# Hash algorithm.
|
47
|
+
attr_accessor :hash_algorithm
|
48
|
+
|
49
|
+
class EnumAttributeValidator
|
50
|
+
attr_reader :datatype
|
51
|
+
attr_reader :allowable_values
|
52
|
+
|
53
|
+
def initialize(datatype, allowable_values)
|
54
|
+
@allowable_values = allowable_values.map do |value|
|
55
|
+
case datatype.to_s
|
56
|
+
when /Integer/i
|
57
|
+
value.to_i
|
58
|
+
when /Float/i
|
59
|
+
value.to_f
|
60
|
+
else
|
61
|
+
value
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def valid?(value)
|
67
|
+
!value || allowable_values.include?(value)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
72
|
+
def self.attribute_map
|
73
|
+
{
|
74
|
+
:'certificate' => :'Certificate',
|
75
|
+
:'reason' => :'Reason',
|
76
|
+
:'location' => :'Location',
|
77
|
+
:'signature_date' => :'SignatureDate',
|
78
|
+
:'hash_algorithm' => :'HashAlgorithm'
|
79
|
+
}
|
80
|
+
end
|
81
|
+
|
82
|
+
# Attribute type mapping.
|
83
|
+
def self.swagger_types
|
84
|
+
{
|
85
|
+
:'certificate' => :'String',
|
86
|
+
:'reason' => :'String',
|
87
|
+
:'location' => :'String',
|
88
|
+
:'signature_date' => :'DateTime',
|
89
|
+
:'hash_algorithm' => :'String'
|
90
|
+
}
|
91
|
+
end
|
92
|
+
|
93
|
+
# Initializes the object
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
95
|
+
def initialize(attributes = {})
|
96
|
+
return unless attributes.is_a?(Hash)
|
97
|
+
|
98
|
+
# convert string to symbol for hash key
|
99
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
100
|
+
|
101
|
+
if attributes.key?(:'Certificate')
|
102
|
+
self.certificate = attributes[:'Certificate']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'Reason')
|
106
|
+
self.reason = attributes[:'Reason']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'Location')
|
110
|
+
self.location = attributes[:'Location']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'SignatureDate')
|
114
|
+
self.signature_date = attributes[:'SignatureDate']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'HashAlgorithm')
|
118
|
+
self.hash_algorithm = attributes[:'HashAlgorithm']
|
119
|
+
end
|
120
|
+
|
121
|
+
end
|
122
|
+
|
123
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
124
|
+
# @return Array for valid properies with the reasons
|
125
|
+
def list_invalid_properties
|
126
|
+
invalid_properties = []
|
127
|
+
if @signature_date.nil?
|
128
|
+
invalid_properties.push("invalid value for 'signature_date', signature_date cannot be nil.")
|
129
|
+
end
|
130
|
+
|
131
|
+
if @hash_algorithm.nil?
|
132
|
+
invalid_properties.push("invalid value for 'hash_algorithm', hash_algorithm cannot be nil.")
|
133
|
+
end
|
134
|
+
|
135
|
+
return invalid_properties
|
136
|
+
end
|
137
|
+
|
138
|
+
# Check to see if the all the properties in the model are valid
|
139
|
+
# @return true if the model is valid
|
140
|
+
def valid?
|
141
|
+
return false if @signature_date.nil?
|
142
|
+
return false if @hash_algorithm.nil?
|
143
|
+
hash_algorithm_validator = EnumAttributeValidator.new('String', ["Sha1", "Sha256", "Sha384", "Sha512", "Md5"])
|
144
|
+
return false unless hash_algorithm_validator.valid?(@hash_algorithm)
|
145
|
+
return true
|
146
|
+
end
|
147
|
+
|
148
|
+
# Custom attribute writer method checking allowed values (enum).
|
149
|
+
# @param [Object] hash_algorithm Object to be assigned
|
150
|
+
def hash_algorithm=(hash_algorithm)
|
151
|
+
validator = EnumAttributeValidator.new('String', ["Sha1", "Sha256", "Sha384", "Sha512", "Md5"])
|
152
|
+
if hash_algorithm.to_i == 0
|
153
|
+
unless validator.valid?(hash_algorithm)
|
154
|
+
raise ArgumentError, "invalid value for 'hash_algorithm', must be one of #{validator.allowable_values}."
|
155
|
+
end
|
156
|
+
@hash_algorithm = hash_algorithm
|
157
|
+
else
|
158
|
+
@hash_algorithm = validator.allowable_values[hash_algorithm.to_i]
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# Checks equality by comparing each attribute.
|
163
|
+
# @param [Object] Object to be compared
|
164
|
+
def ==(other)
|
165
|
+
return true if self.equal?(other)
|
166
|
+
self.class == other.class &&
|
167
|
+
certificate == other.certificate &&
|
168
|
+
reason == other.reason &&
|
169
|
+
location == other.location &&
|
170
|
+
signature_date == other.signature_date &&
|
171
|
+
hash_algorithm == other.hash_algorithm
|
172
|
+
end
|
173
|
+
|
174
|
+
# @see the `==` method
|
175
|
+
# @param [Object] Object to be compared
|
176
|
+
def eql?(other)
|
177
|
+
self == other
|
178
|
+
end
|
179
|
+
|
180
|
+
# Calculates hash code according to all attributes.
|
181
|
+
# @return [Fixnum] Hash code
|
182
|
+
def hash
|
183
|
+
[certificate, reason, location, signature_date, hash_algorithm].hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# Builds the object from hash
|
187
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
188
|
+
# @return [Object] Returns the model itself
|
189
|
+
def build_from_hash(attributes)
|
190
|
+
return nil unless attributes.is_a?(Hash)
|
191
|
+
self.class.swagger_types.each_pair do |key, type|
|
192
|
+
if type =~ /\AArray<(.*)>/i
|
193
|
+
# check to ensure the input is an array given that the the attribute
|
194
|
+
# is documented as an array but the input is not
|
195
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
196
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
197
|
+
end
|
198
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
199
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
200
|
+
end
|
201
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
202
|
+
end
|
203
|
+
|
204
|
+
self
|
205
|
+
end
|
206
|
+
|
207
|
+
# Deserializes the data based on type
|
208
|
+
# @param string type Data type
|
209
|
+
# @param string value Value to be deserialized
|
210
|
+
# @return [Object] Deserialized data
|
211
|
+
def _deserialize(type, value)
|
212
|
+
case type.to_sym
|
213
|
+
when :DateTime
|
214
|
+
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
215
|
+
when :Date
|
216
|
+
Time.at(/\d/.match(value)[0].to_f).to_date
|
217
|
+
when :String
|
218
|
+
value.to_s
|
219
|
+
when :Integer
|
220
|
+
value.to_i
|
221
|
+
when :Float
|
222
|
+
value.to_f
|
223
|
+
when :BOOLEAN
|
224
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
225
|
+
true
|
226
|
+
else
|
227
|
+
false
|
228
|
+
end
|
229
|
+
when :Object
|
230
|
+
# generic object (usually a Hash), return directly
|
231
|
+
value
|
232
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
233
|
+
inner_type = Regexp.last_match[:inner_type]
|
234
|
+
value.map { |v| _deserialize(inner_type, v) }
|
235
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
236
|
+
k_type = Regexp.last_match[:k_type]
|
237
|
+
v_type = Regexp.last_match[:v_type]
|
238
|
+
{}.tap do |hash|
|
239
|
+
value.each do |k, v|
|
240
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
241
|
+
end
|
242
|
+
end
|
243
|
+
else
|
244
|
+
# model
|
245
|
+
temp_model = AsposeCadCloud.const_get(type).new
|
246
|
+
temp_model.build_from_hash(value)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
# Returns the string representation of the object
|
251
|
+
# @return [String] String presentation of the object
|
252
|
+
def to_s
|
253
|
+
to_hash.to_s
|
254
|
+
end
|
255
|
+
|
256
|
+
# to_body is an alias to to_hash (backward compatibility)
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
258
|
+
def to_body
|
259
|
+
to_hash
|
260
|
+
end
|
261
|
+
|
262
|
+
# Returns the object in the form of hash
|
263
|
+
# @return [Hash] Returns the object in the form of hash
|
264
|
+
def to_hash
|
265
|
+
hash = {}
|
266
|
+
self.class.attribute_map.each_pair do |attr, param|
|
267
|
+
value = self.send(attr)
|
268
|
+
next if value.nil?
|
269
|
+
hash[param] = _to_hash(value)
|
270
|
+
end
|
271
|
+
hash
|
272
|
+
end
|
273
|
+
|
274
|
+
# Outputs non-array value in the form of hash
|
275
|
+
# For object, use to_hash. Otherwise, just return the value
|
276
|
+
# @param [Object] value Any valid value
|
277
|
+
# @return [Hash] Returns the value in the form of hash
|
278
|
+
def _to_hash(value)
|
279
|
+
if value.is_a?(Array)
|
280
|
+
value.compact.map { |v| _to_hash(v) }
|
281
|
+
elsif value.is_a?(Hash)
|
282
|
+
{}.tap do |hash|
|
283
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
284
|
+
end
|
285
|
+
elsif value.respond_to? :to_hash
|
286
|
+
value.to_hash
|
287
|
+
else
|
288
|
+
value
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
end
|
293
|
+
|
294
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
module AsposeCadCloud
|
5
|
+
|
6
|
+
class PdfDigitalSignatureHashAlgorithmCore
|
7
|
+
|
8
|
+
SHA1 = "Sha1".freeze
|
9
|
+
SHA256 = "Sha256".freeze
|
10
|
+
SHA384 = "Sha384".freeze
|
11
|
+
SHA512 = "Sha512".freeze
|
12
|
+
MD5 = "Md5".freeze
|
13
|
+
|
14
|
+
# Builds the enum from string
|
15
|
+
# @param [String] The enum value in the form of the string
|
16
|
+
# @return [String] The enum value
|
17
|
+
def build_from_hash(value)
|
18
|
+
constantValues = PdfDigitalSignatureHashAlgorithmCore.constants.select{|c| PdfDigitalSignatureHashAlgorithmCore::const_get(c) == value}
|
19
|
+
raise "Invalid ENUM value #{value} for class #PdfDigitalSignatureHashAlgorithmCore" if constantValues.empty?
|
20
|
+
value
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -4,7 +4,7 @@ require 'date'
|
|
4
4
|
module AsposeCadCloud
|
5
5
|
#
|
6
6
|
# --------------------------------------------------------------------------------------------------------------------
|
7
|
-
# <copyright company="Aspose" file="
|
7
|
+
# <copyright company="Aspose" file="PdfDocumentOptionsDTO.rb">
|
8
8
|
# Copyright (c) 2017 Aspose.CAD Cloud
|
9
9
|
# </copyright>
|
10
10
|
# <summary>
|
@@ -29,10 +29,13 @@ module AsposeCadCloud
|
|
29
29
|
# --------------------------------------------------------------------------------------------------------------------
|
30
30
|
#
|
31
31
|
|
32
|
-
|
33
|
-
class
|
32
|
+
# Export document options.
|
33
|
+
class PdfDocumentOptionsDTO
|
34
34
|
attr_accessor :compliance
|
35
35
|
|
36
|
+
# Gets or sets a digital signature details. If not set, then no signing will be performed.
|
37
|
+
attr_accessor :digital_signature_details
|
38
|
+
|
36
39
|
class EnumAttributeValidator
|
37
40
|
attr_reader :datatype
|
38
41
|
attr_reader :allowable_values
|
@@ -58,14 +61,16 @@ module AsposeCadCloud
|
|
58
61
|
# Attribute mapping from ruby-style variable name to JSON key.
|
59
62
|
def self.attribute_map
|
60
63
|
{
|
61
|
-
:'compliance' => :'Compliance'
|
64
|
+
:'compliance' => :'Compliance',
|
65
|
+
:'digital_signature_details' => :'DigitalSignatureDetails'
|
62
66
|
}
|
63
67
|
end
|
64
68
|
|
65
69
|
# Attribute type mapping.
|
66
70
|
def self.swagger_types
|
67
71
|
{
|
68
|
-
:'compliance' => :'String'
|
72
|
+
:'compliance' => :'String',
|
73
|
+
:'digital_signature_details' => :'PdfDigitalSignatureDetailsCoreDTO'
|
69
74
|
}
|
70
75
|
end
|
71
76
|
|
@@ -81,6 +86,10 @@ module AsposeCadCloud
|
|
81
86
|
self.compliance = attributes[:'Compliance']
|
82
87
|
end
|
83
88
|
|
89
|
+
if attributes.key?(:'DigitalSignatureDetails')
|
90
|
+
self.digital_signature_details = attributes[:'DigitalSignatureDetails']
|
91
|
+
end
|
92
|
+
|
84
93
|
end
|
85
94
|
|
86
95
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -122,7 +131,8 @@ module AsposeCadCloud
|
|
122
131
|
def ==(other)
|
123
132
|
return true if self.equal?(other)
|
124
133
|
self.class == other.class &&
|
125
|
-
compliance == other.compliance
|
134
|
+
compliance == other.compliance &&
|
135
|
+
digital_signature_details == other.digital_signature_details
|
126
136
|
end
|
127
137
|
|
128
138
|
# @see the `==` method
|
@@ -134,7 +144,7 @@ module AsposeCadCloud
|
|
134
144
|
# Calculates hash code according to all attributes.
|
135
145
|
# @return [Fixnum] Hash code
|
136
146
|
def hash
|
137
|
-
[compliance].hash
|
147
|
+
[compliance, digital_signature_details].hash
|
138
148
|
end
|
139
149
|
|
140
150
|
# Builds the object from hash
|
@@ -91,7 +91,7 @@ module AsposeCadCloud
|
|
91
91
|
:'resolution_settings' => :'ResolutionSetting',
|
92
92
|
:'vector_rasterization_options' => :'CadRasterizationOptionsDTO',
|
93
93
|
:'pdf_document_info' => :'PdfDocumentInfo',
|
94
|
-
:'core_pdf_options' => :'
|
94
|
+
:'core_pdf_options' => :'PdfDocumentOptionsDTO'
|
95
95
|
}
|
96
96
|
end
|
97
97
|
|
@@ -0,0 +1,197 @@
|
|
1
|
+
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
module AsposeCadCloud
|
5
|
+
#
|
6
|
+
# --------------------------------------------------------------------------------------------------------------------
|
7
|
+
# <copyright company="Aspose" file="PltProperties.rb">
|
8
|
+
# Copyright (c) 2017 Aspose.CAD Cloud
|
9
|
+
# </copyright>
|
10
|
+
# <summary>
|
11
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
12
|
+
# of this software and associated documentation files (the "Software"), to deal
|
13
|
+
# in the Software without restriction, including without limitation the rights
|
14
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
15
|
+
# copies of the Software, and to permit persons to whom the Software is
|
16
|
+
# furnished to do so, subject to the following conditions:
|
17
|
+
#
|
18
|
+
# The above copyright notice and this permission notice shall be included in all
|
19
|
+
# copies or substantial portions of the Software.
|
20
|
+
#
|
21
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
26
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
27
|
+
# SOFTWARE.
|
28
|
+
# </summary>
|
29
|
+
# --------------------------------------------------------------------------------------------------------------------
|
30
|
+
#
|
31
|
+
|
32
|
+
# Represents information about PLT drawing.
|
33
|
+
class PltProperties
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.swagger_types
|
43
|
+
{
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Initializes the object
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
49
|
+
def initialize(attributes = {})
|
50
|
+
return unless attributes.is_a?(Hash)
|
51
|
+
|
52
|
+
# convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
58
|
+
# @return Array for valid properies with the reasons
|
59
|
+
def list_invalid_properties
|
60
|
+
invalid_properties = []
|
61
|
+
return invalid_properties
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
def valid?
|
67
|
+
return true
|
68
|
+
end
|
69
|
+
|
70
|
+
# Checks equality by comparing each attribute.
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def ==(other)
|
73
|
+
return true if self.equal?(other)
|
74
|
+
self.class == other.class
|
75
|
+
end
|
76
|
+
|
77
|
+
# @see the `==` method
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def eql?(other)
|
80
|
+
self == other
|
81
|
+
end
|
82
|
+
|
83
|
+
# Calculates hash code according to all attributes.
|
84
|
+
# @return [Fixnum] Hash code
|
85
|
+
def hash
|
86
|
+
[].hash
|
87
|
+
end
|
88
|
+
|
89
|
+
# Builds the object from hash
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
91
|
+
# @return [Object] Returns the model itself
|
92
|
+
def build_from_hash(attributes)
|
93
|
+
return nil unless attributes.is_a?(Hash)
|
94
|
+
self.class.swagger_types.each_pair do |key, type|
|
95
|
+
if type =~ /\AArray<(.*)>/i
|
96
|
+
# check to ensure the input is an array given that the the attribute
|
97
|
+
# is documented as an array but the input is not
|
98
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
99
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
100
|
+
end
|
101
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
102
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
103
|
+
end
|
104
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
105
|
+
end
|
106
|
+
|
107
|
+
self
|
108
|
+
end
|
109
|
+
|
110
|
+
# Deserializes the data based on type
|
111
|
+
# @param string type Data type
|
112
|
+
# @param string value Value to be deserialized
|
113
|
+
# @return [Object] Deserialized data
|
114
|
+
def _deserialize(type, value)
|
115
|
+
case type.to_sym
|
116
|
+
when :DateTime
|
117
|
+
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
118
|
+
when :Date
|
119
|
+
Time.at(/\d/.match(value)[0].to_f).to_date
|
120
|
+
when :String
|
121
|
+
value.to_s
|
122
|
+
when :Integer
|
123
|
+
value.to_i
|
124
|
+
when :Float
|
125
|
+
value.to_f
|
126
|
+
when :BOOLEAN
|
127
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
128
|
+
true
|
129
|
+
else
|
130
|
+
false
|
131
|
+
end
|
132
|
+
when :Object
|
133
|
+
# generic object (usually a Hash), return directly
|
134
|
+
value
|
135
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
136
|
+
inner_type = Regexp.last_match[:inner_type]
|
137
|
+
value.map { |v| _deserialize(inner_type, v) }
|
138
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
139
|
+
k_type = Regexp.last_match[:k_type]
|
140
|
+
v_type = Regexp.last_match[:v_type]
|
141
|
+
{}.tap do |hash|
|
142
|
+
value.each do |k, v|
|
143
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
else
|
147
|
+
# model
|
148
|
+
temp_model = AsposeCadCloud.const_get(type).new
|
149
|
+
temp_model.build_from_hash(value)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# Returns the string representation of the object
|
154
|
+
# @return [String] String presentation of the object
|
155
|
+
def to_s
|
156
|
+
to_hash.to_s
|
157
|
+
end
|
158
|
+
|
159
|
+
# to_body is an alias to to_hash (backward compatibility)
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
161
|
+
def to_body
|
162
|
+
to_hash
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns the object in the form of hash
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
167
|
+
def to_hash
|
168
|
+
hash = {}
|
169
|
+
self.class.attribute_map.each_pair do |attr, param|
|
170
|
+
value = self.send(attr)
|
171
|
+
next if value.nil?
|
172
|
+
hash[param] = _to_hash(value)
|
173
|
+
end
|
174
|
+
hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Outputs non-array value in the form of hash
|
178
|
+
# For object, use to_hash. Otherwise, just return the value
|
179
|
+
# @param [Object] value Any valid value
|
180
|
+
# @return [Hash] Returns the value in the form of hash
|
181
|
+
def _to_hash(value)
|
182
|
+
if value.is_a?(Array)
|
183
|
+
value.compact.map { |v| _to_hash(v) }
|
184
|
+
elsif value.is_a?(Hash)
|
185
|
+
{}.tap do |hash|
|
186
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
187
|
+
end
|
188
|
+
elsif value.respond_to? :to_hash
|
189
|
+
value.to_hash
|
190
|
+
else
|
191
|
+
value
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
end
|
196
|
+
|
197
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
module AsposeCadCloud
|
5
|
+
|
6
|
+
class PngColorType
|
7
|
+
|
8
|
+
GRAYSCALE = "Grayscale".freeze
|
9
|
+
TRUECOLOR = "Truecolor".freeze
|
10
|
+
INDEXED_COLOR = "IndexedColor".freeze
|
11
|
+
GRAYSCALE_WITH_ALPHA = "GrayscaleWithAlpha".freeze
|
12
|
+
TRUECOLOR_WITH_ALPHA = "TruecolorWithAlpha".freeze
|
13
|
+
|
14
|
+
# Builds the enum from string
|
15
|
+
# @param [String] The enum value in the form of the string
|
16
|
+
# @return [String] The enum value
|
17
|
+
def build_from_hash(value)
|
18
|
+
constantValues = PngColorType.constants.select{|c| PngColorType::const_get(c) == value}
|
19
|
+
raise "Invalid ENUM value #{value} for class #PngColorType" if constantValues.empty?
|
20
|
+
value
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
module AsposeCadCloud
|
5
|
+
|
6
|
+
class PngFilterType
|
7
|
+
|
8
|
+
NONE = "None".freeze
|
9
|
+
SUB = "Sub".freeze
|
10
|
+
UP = "Up".freeze
|
11
|
+
AVG = "Avg".freeze
|
12
|
+
PAETH = "Paeth".freeze
|
13
|
+
ADAPTIVE = "Adaptive".freeze
|
14
|
+
|
15
|
+
# Builds the enum from string
|
16
|
+
# @param [String] The enum value in the form of the string
|
17
|
+
# @return [String] The enum value
|
18
|
+
def build_from_hash(value)
|
19
|
+
constantValues = PngFilterType.constants.select{|c| PngFilterType::const_get(c) == value}
|
20
|
+
raise "Invalid ENUM value #{value} for class #PngFilterType" if constantValues.empty?
|
21
|
+
value
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|