aspose_cad_cloud 24.1 → 24.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47132d65399df4039e05d3e69a4d1e0dc7aa3e9d910bae6cb8b4ef7c3987c809
4
- data.tar.gz: d333782e790ff176d108e631a80b71474bc3d45ccbb0ba16e8fd2fbc8f700e7a
3
+ metadata.gz: 0b76ed8473eb9fe882d2f12e24c5f46bba2a8b27a0bdb6d8bcc6d98fdd44e7df
4
+ data.tar.gz: efbbdfa2a5896be6397ee11431d435392d3c7a3e96d9f4a8710746e81ad798e4
5
5
  SHA512:
6
- metadata.gz: 753118803fad1798d13f48de8ae93fadeaf11140ed492ceaeabc149274b07dca00f6ddc0f7f6451b2a08c18a1ec10f721f05ec29347020d80e760829de54c7fd
7
- data.tar.gz: 9946cf6b9f8875772a93ed870031935cbf062a0c6bfe55e9d8bf528b2d9b02f977cf24c32df783df27e020fdd69bee5d93bfb2556c60a694cd131439803d3842
6
+ metadata.gz: 1c42f2f182f1bc037e01103d651b15556441456754c2cff82c1c007925ae3643dece44f38184fab3a25bf230e07808663c55aa34cab2feaed28a990f85eec187
7
+ data.tar.gz: 23d8945235393ba2bee4b77c9d988c5bcf533494972be5846793de3adeb0de6eb4ef01e9e0a3485ce0e894cef3114cafec001d3fab96ece880eb4a383619edee
@@ -38,7 +38,7 @@ module AsposeCadCloud
38
38
  request_token
39
39
  end
40
40
 
41
- # Convert CAD drawing to DXF, DWG, DGN, DWF, DWFX, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, PDF, SVG format.
41
+ # Convert CAD drawing to DXF, DWG, DGN, DWF, DWFX, DRC, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, PDF, SVG format.
42
42
  #
43
43
  # @param request ConvertRequest
44
44
  # @return [File]
@@ -48,7 +48,7 @@ module AsposeCadCloud
48
48
  data
49
49
  end
50
50
 
51
- # Convert CAD drawing to DXF, DWG, DGN, DWF, DWFX, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, PDF, SVG format.
51
+ # Convert CAD drawing to DXF, DWG, DGN, DWF, DWFX, DRC, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, PDF, SVG format.
52
52
  #
53
53
  # @param request ConvertRequest
54
54
  # @return [Array<(File, Fixnum, Hash)>]
@@ -524,7 +524,7 @@ module AsposeCadCloud
524
524
  # Get Metadata info
525
525
  #
526
526
  # @param request EditMetadataRequest
527
- # @return [String]
527
+ # @return [File]
528
528
  def edit_metadata(request)
529
529
  data, _status_code, _headers = edit_metadata_with_http_info(request)
530
530
  request_token if _status_code == 401
@@ -534,8 +534,8 @@ module AsposeCadCloud
534
534
  # Get Metadata info
535
535
  #
536
536
  # @param request EditMetadataRequest
537
- # @return [Array<(String, Fixnum, Hash)>]
538
- # String data, response status code and response headers
537
+ # @return [Array<(File, Fixnum, Hash)>]
538
+ # File data, response status code and response headers
539
539
  def edit_metadata_with_http_info(request)
540
540
  raise ArgumentError, 'Incorrect request type' unless request.is_a? EditMetadataRequest
541
541
 
@@ -551,7 +551,7 @@ module AsposeCadCloud
551
551
  # HTTP header 'Accept' (if needed)
552
552
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
553
553
  # HTTP header 'Content-Type'
554
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream', 'multipart/form-data'])
554
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
555
555
 
556
556
  # form parameters
557
557
  form_params = {}
@@ -570,7 +570,7 @@ module AsposeCadCloud
570
570
  form_params: form_params,
571
571
  body: post_body,
572
572
  auth_names: auth_names,
573
- return_type: 'String')
573
+ return_type: 'File')
574
574
  if @api_client.config.debugging
575
575
  @api_client.config.logger.debug "API called:
576
576
  CadApi#edit_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
@@ -1419,7 +1419,7 @@ module AsposeCadCloud
1419
1419
  [data, status_code, headers]
1420
1420
  end
1421
1421
 
1422
- # Convert bitmap image to DXF, DWG, DGN, DWF, DWFX, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, SVG format.
1422
+ # Convert bitmap image to DXF, DWG, DGN, DWF, DWFX, DRC, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, SVG format.
1423
1423
  #
1424
1424
  # @param request PaperToCadRequest
1425
1425
  # @return [File]
@@ -1429,7 +1429,7 @@ module AsposeCadCloud
1429
1429
  data
1430
1430
  end
1431
1431
 
1432
- # Convert bitmap image to DXF, DWG, DGN, DWF, DWFX, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, SVG format.
1432
+ # Convert bitmap image to DXF, DWG, DGN, DWF, DWFX, DRC, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, SVG format.
1433
1433
  #
1434
1434
  # @param request PaperToCadRequest
1435
1435
  # @return [Array<(File, Fixnum, Hash)>]
@@ -1708,6 +1708,82 @@ module AsposeCadCloud
1708
1708
  [data, status_code, headers]
1709
1709
  end
1710
1710
 
1711
+ # Export an existing drawing to Draco format with export settings specified.
1712
+ #
1713
+ # @param request PostDrawingDracoRequest
1714
+ # @return [File]
1715
+ def post_drawing_draco(request)
1716
+ data, _status_code, _headers = post_drawing_draco_with_http_info(request)
1717
+ request_token if _status_code == 401
1718
+ data
1719
+ end
1720
+
1721
+ # Export an existing drawing to Draco format with export settings specified.
1722
+ #
1723
+ # @param request PostDrawingDracoRequest
1724
+ # @return [Array<(File, Fixnum, Hash)>]
1725
+ # File data, response status code and response headers
1726
+ def post_drawing_draco_with_http_info(request)
1727
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingDracoRequest
1728
+
1729
+ @api_client.config.logger.debug 'Calling API: CadApi.post_drawing_draco ...' if @api_client.config.debugging
1730
+ # verify the required parameter 'name' is set
1731
+ raise ArgumentError, 'Missing the required parameter name when calling CadApi.post_drawing_draco' if @api_client.config.client_side_validation && request.name.nil?
1732
+ # verify the required parameter 'options' is set
1733
+ raise ArgumentError, 'Missing the required parameter options when calling CadApi.post_drawing_draco' if @api_client.config.client_side_validation && request.options.nil?
1734
+ # resource path
1735
+ local_var_path = '/cad/{name}/drc'
1736
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
1737
+
1738
+ # query parameters
1739
+ query_params = {}
1740
+ if local_var_path.include? downcase_first_letter('folder')
1741
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
1742
+ else
1743
+ query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
1744
+ end
1745
+ if local_var_path.include? downcase_first_letter('outPath')
1746
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
1747
+ else
1748
+ query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
1749
+ end
1750
+ if local_var_path.include? downcase_first_letter('storage')
1751
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
1752
+ else
1753
+ query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
1754
+ end
1755
+
1756
+ # header parameters
1757
+ header_params = {}
1758
+ # HTTP header 'Accept' (if needed)
1759
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1760
+ # HTTP header 'Content-Type'
1761
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1762
+
1763
+ # form parameters
1764
+ form_params = {}
1765
+
1766
+ if not form_params.empty?
1767
+ header_params['Content-Type'] = 'multipart/form-data'
1768
+ end
1769
+
1770
+ # http body (model)
1771
+ post_body = @api_client.object_to_http_body(request.options)
1772
+ auth_names = ['Bearer']
1773
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1774
+ header_params: header_params,
1775
+ query_params: query_params,
1776
+ form_params: form_params,
1777
+ body: post_body,
1778
+ auth_names: auth_names,
1779
+ return_type: 'File')
1780
+ if @api_client.config.debugging
1781
+ @api_client.config.logger.debug "API called:
1782
+ CadApi#post_drawing_draco\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1783
+ end
1784
+ [data, status_code, headers]
1785
+ end
1786
+
1711
1787
  # Export an existing drawing to Dwf format with export settings specified.
1712
1788
  #
1713
1789
  # @param request PostDrawingDwfRequest
@@ -3653,6 +3729,76 @@ module AsposeCadCloud
3653
3729
  [data, status_code, headers]
3654
3730
  end
3655
3731
 
3732
+ # Export drawing to Draco format. Drawing data is passed as zero-indexed multipart/form-data as well as export Draco options serialized as JSON. Order of drawing data and Draco options could vary.
3733
+ #
3734
+ # @param request PutDrawingDracoRequest
3735
+ # @return [File]
3736
+ def put_drawing_draco(request)
3737
+ data, _status_code, _headers = put_drawing_draco_with_http_info(request)
3738
+ request_token if _status_code == 401
3739
+ data
3740
+ end
3741
+
3742
+ # Export drawing to Draco format. Drawing data is passed as zero-indexed multipart/form-data as well as export Draco options serialized as JSON. Order of drawing data and Draco options could vary.
3743
+ #
3744
+ # @param request PutDrawingDracoRequest
3745
+ # @return [Array<(File, Fixnum, Hash)>]
3746
+ # File data, response status code and response headers
3747
+ def put_drawing_draco_with_http_info(request)
3748
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? PutDrawingDracoRequest
3749
+
3750
+ @api_client.config.logger.debug 'Calling API: CadApi.put_drawing_draco ...' if @api_client.config.debugging
3751
+ # verify the required parameter 'drawing_data' is set
3752
+ raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.put_drawing_draco' if @api_client.config.client_side_validation && request.drawing_data.nil?
3753
+ # resource path
3754
+ local_var_path = '/cad/drc'
3755
+
3756
+ # query parameters
3757
+ query_params = {}
3758
+ if local_var_path.include? downcase_first_letter('outPath')
3759
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
3760
+ else
3761
+ query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
3762
+ end
3763
+ if local_var_path.include? downcase_first_letter('storage')
3764
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
3765
+ else
3766
+ query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
3767
+ end
3768
+
3769
+ # header parameters
3770
+ header_params = {}
3771
+ # HTTP header 'Accept' (if needed)
3772
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3773
+ # HTTP header 'Content-Type'
3774
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
3775
+
3776
+ # form parameters
3777
+ form_params = {}
3778
+ form_params[downcase_first_letter('drawingData')] = request.drawing_data
3779
+ form_params[downcase_first_letter('exportOptions')] = request.export_options unless request.export_options.nil?
3780
+
3781
+ if not form_params.empty?
3782
+ header_params['Content-Type'] = 'multipart/form-data'
3783
+ end
3784
+
3785
+ # http body (model)
3786
+ post_body = nil
3787
+ auth_names = ['Bearer']
3788
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
3789
+ header_params: header_params,
3790
+ query_params: query_params,
3791
+ form_params: form_params,
3792
+ body: post_body,
3793
+ auth_names: auth_names,
3794
+ return_type: 'File')
3795
+ if @api_client.config.debugging
3796
+ @api_client.config.logger.debug "API called:
3797
+ CadApi#put_drawing_draco\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3798
+ end
3799
+ [data, status_code, headers]
3800
+ end
3801
+
3656
3802
  # Export drawing to Dwf format. Drawing data is passed as zero-indexed multipart/form-data as well as export Dwf options serialized as JSON. Order of drawing data and Dwf options could vary.
3657
3803
  #
3658
3804
  # @param request PutDrawingDwfRequest
@@ -0,0 +1,281 @@
1
+
2
+ require 'date'
3
+
4
+ module AsposeCadCloud
5
+ #
6
+ # --------------------------------------------------------------------------------------------------------------------
7
+ # <copyright company="Aspose" file="DracoOptionsDTO.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
+ # Export options for Draco format
33
+ class DracoOptionsDTO
34
+ # Resulting rotation operation
35
+ attr_accessor :rotation
36
+
37
+ # Layers to export
38
+ attr_accessor :layers
39
+
40
+ # DPI resolution settings
41
+ attr_accessor :resolution_settings
42
+
43
+ # Raster options
44
+ attr_accessor :vector_rasterization_options
45
+
46
+ class EnumAttributeValidator
47
+ attr_reader :datatype
48
+ attr_reader :allowable_values
49
+
50
+ def initialize(datatype, allowable_values)
51
+ @allowable_values = allowable_values.map do |value|
52
+ case datatype.to_s
53
+ when /Integer/i
54
+ value.to_i
55
+ when /Float/i
56
+ value.to_f
57
+ else
58
+ value
59
+ end
60
+ end
61
+ end
62
+
63
+ def valid?(value)
64
+ !value || allowable_values.include?(value)
65
+ end
66
+ end
67
+
68
+ # Attribute mapping from ruby-style variable name to JSON key.
69
+ def self.attribute_map
70
+ {
71
+ :'rotation' => :'Rotation',
72
+ :'layers' => :'Layers',
73
+ :'resolution_settings' => :'ResolutionSettings',
74
+ :'vector_rasterization_options' => :'VectorRasterizationOptions'
75
+ }
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.swagger_types
80
+ {
81
+ :'rotation' => :'String',
82
+ :'layers' => :'Array<String>',
83
+ :'resolution_settings' => :'ResolutionSetting',
84
+ :'vector_rasterization_options' => :'CadRasterizationOptionsDTO'
85
+ }
86
+ end
87
+
88
+ # Initializes the object
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ def initialize(attributes = {})
91
+ return unless attributes.is_a?(Hash)
92
+
93
+ # convert string to symbol for hash key
94
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
95
+
96
+ if attributes.key?(:'Rotation')
97
+ self.rotation = attributes[:'Rotation']
98
+ end
99
+
100
+ if attributes.key?(:'Layers')
101
+ if (value = attributes[:'Layers']).is_a?(Array)
102
+ self.layers = value
103
+ end
104
+ end
105
+
106
+ if attributes.key?(:'ResolutionSettings')
107
+ self.resolution_settings = attributes[:'ResolutionSettings']
108
+ end
109
+
110
+ if attributes.key?(:'VectorRasterizationOptions')
111
+ self.vector_rasterization_options = attributes[:'VectorRasterizationOptions']
112
+ end
113
+
114
+ end
115
+
116
+ # Show invalid properties with the reasons. Usually used together with valid?
117
+ # @return Array for valid properies with the reasons
118
+ def list_invalid_properties
119
+ invalid_properties = []
120
+ if @rotation.nil?
121
+ invalid_properties.push("invalid value for 'rotation', rotation cannot be nil.")
122
+ end
123
+
124
+ return invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ return false if @rotation.nil?
131
+ rotation_validator = EnumAttributeValidator.new('String', ["RotateNoneFlipNone", "Rotate90FlipNone", "Rotate180FlipNone", "Rotate270FlipNone", "RotateNoneFlipX", "Rotate90FlipX", "Rotate180FlipX", "Rotate270FlipX", "RotateNoneFlipY", "Rotate90FlipY", "Rotate180FlipY", "Rotate270FlipY", "RotateNoneFlipXY", "Rotate90FlipXY", "Rotate180FlipXY", "Rotate270FlipXY"])
132
+ return false unless rotation_validator.valid?(@rotation)
133
+ return true
134
+ end
135
+
136
+ # Custom attribute writer method checking allowed values (enum).
137
+ # @param [Object] rotation Object to be assigned
138
+ def rotation=(rotation)
139
+ validator = EnumAttributeValidator.new('String', ["RotateNoneFlipNone", "Rotate90FlipNone", "Rotate180FlipNone", "Rotate270FlipNone", "RotateNoneFlipX", "Rotate90FlipX", "Rotate180FlipX", "Rotate270FlipX", "RotateNoneFlipY", "Rotate90FlipY", "Rotate180FlipY", "Rotate270FlipY", "RotateNoneFlipXY", "Rotate90FlipXY", "Rotate180FlipXY", "Rotate270FlipXY"])
140
+ if rotation.to_i == 0
141
+ unless validator.valid?(rotation)
142
+ raise ArgumentError, "invalid value for 'rotation', must be one of #{validator.allowable_values}."
143
+ end
144
+ @rotation = rotation
145
+ else
146
+ @rotation = validator.allowable_values[rotation.to_i]
147
+ end
148
+ end
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] Object to be compared
152
+ def ==(other)
153
+ return true if self.equal?(other)
154
+ self.class == other.class &&
155
+ rotation == other.rotation &&
156
+ layers == other.layers &&
157
+ resolution_settings == other.resolution_settings &&
158
+ vector_rasterization_options == other.vector_rasterization_options
159
+ end
160
+
161
+ # @see the `==` method
162
+ # @param [Object] Object to be compared
163
+ def eql?(other)
164
+ self == other
165
+ end
166
+
167
+ # Calculates hash code according to all attributes.
168
+ # @return [Fixnum] Hash code
169
+ def hash
170
+ [rotation, layers, resolution_settings, vector_rasterization_options].hash
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def build_from_hash(attributes)
177
+ return nil unless attributes.is_a?(Hash)
178
+ self.class.swagger_types.each_pair do |key, type|
179
+ if type =~ /\AArray<(.*)>/i
180
+ # check to ensure the input is an array given that the the attribute
181
+ # is documented as an array but the input is not
182
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
183
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
184
+ end
185
+ elsif !attributes[self.class.attribute_map[key]].nil?
186
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
187
+ end
188
+ # or else data not found in attributes(hash), not an issue as the data can be optional
189
+ end
190
+
191
+ self
192
+ end
193
+
194
+ # Deserializes the data based on type
195
+ # @param string type Data type
196
+ # @param string value Value to be deserialized
197
+ # @return [Object] Deserialized data
198
+ def _deserialize(type, value)
199
+ case type.to_sym
200
+ when :DateTime
201
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
202
+ when :Date
203
+ Time.at(/\d/.match(value)[0].to_f).to_date
204
+ when :String
205
+ value.to_s
206
+ when :Integer
207
+ value.to_i
208
+ when :Float
209
+ value.to_f
210
+ when :BOOLEAN
211
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
212
+ true
213
+ else
214
+ false
215
+ end
216
+ when :Object
217
+ # generic object (usually a Hash), return directly
218
+ value
219
+ when /\AArray<(?<inner_type>.+)>\z/
220
+ inner_type = Regexp.last_match[:inner_type]
221
+ value.map { |v| _deserialize(inner_type, v) }
222
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
223
+ k_type = Regexp.last_match[:k_type]
224
+ v_type = Regexp.last_match[:v_type]
225
+ {}.tap do |hash|
226
+ value.each do |k, v|
227
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
228
+ end
229
+ end
230
+ else
231
+ # model
232
+ temp_model = AsposeCadCloud.const_get(type).new
233
+ temp_model.build_from_hash(value)
234
+ end
235
+ end
236
+
237
+ # Returns the string representation of the object
238
+ # @return [String] String presentation of the object
239
+ def to_s
240
+ to_hash.to_s
241
+ end
242
+
243
+ # to_body is an alias to to_hash (backward compatibility)
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_body
246
+ to_hash
247
+ end
248
+
249
+ # Returns the object in the form of hash
250
+ # @return [Hash] Returns the object in the form of hash
251
+ def to_hash
252
+ hash = {}
253
+ self.class.attribute_map.each_pair do |attr, param|
254
+ value = self.send(attr)
255
+ next if value.nil?
256
+ hash[param] = _to_hash(value)
257
+ end
258
+ hash
259
+ end
260
+
261
+ # Outputs non-array value in the form of hash
262
+ # For object, use to_hash. Otherwise, just return the value
263
+ # @param [Object] value Any valid value
264
+ # @return [Hash] Returns the value in the form of hash
265
+ def _to_hash(value)
266
+ if value.is_a?(Array)
267
+ value.compact.map { |v| _to_hash(v) }
268
+ elsif value.is_a?(Hash)
269
+ {}.tap do |hash|
270
+ value.each { |k, v| hash[k] = _to_hash(v) }
271
+ end
272
+ elsif value.respond_to? :to_hash
273
+ value.to_hash
274
+ else
275
+ value
276
+ end
277
+ end
278
+
279
+ end
280
+
281
+ end
@@ -32,7 +32,7 @@ module AsposeCadCloud
32
32
  #
33
33
  class ConvertRequest
34
34
 
35
- # Output DXF, DWG, DGN, DWF, DWFX, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, PDF, SVG, PNG, BMP, DIB, TIFF, TIF, JPEG, GIF, PSD, JPG, JPE, JIF, JFIF, PSD, WEBP, DCM, DICOM, JP2, J2K, JPF, JPM, JPG2, J2C, JPC, JPX, MJ2 , DJVU file format.
35
+ # Output DXF, DWG, DGN, DWF, DWFX, DRC, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, PDF, SVG, PNG, BMP, DIB, TIFF, TIF, JPEG, GIF, PSD, JPG, JPE, JIF, JFIF, PSD, WEBP, DCM, DICOM, JP2, J2K, JPF, JPM, JPG2, J2C, JPC, JPX, MJ2 , DJVU file format.
36
36
  attr_accessor :output_format
37
37
  # Form-data file
38
38
  attr_accessor :drawing
@@ -41,7 +41,7 @@ module AsposeCadCloud
41
41
 
42
42
  #
43
43
  # Initializes a new instance.
44
- # @param output_format Output DXF, DWG, DGN, DWF, DWFX, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, PDF, SVG, PNG, BMP, DIB, TIFF, TIF, JPEG, GIF, PSD, JPG, JPE, JIF, JFIF, PSD, WEBP, DCM, DICOM, JP2, J2K, JPF, JPM, JPG2, J2C, JPC, JPX, MJ2 , DJVU file format.
44
+ # @param output_format Output DXF, DWG, DGN, DWF, DWFX, DRC, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, PDF, SVG, PNG, BMP, DIB, TIFF, TIF, JPEG, GIF, PSD, JPG, JPE, JIF, JFIF, PSD, WEBP, DCM, DICOM, JP2, J2K, JPF, JPM, JPG2, J2C, JPC, JPX, MJ2 , DJVU file format.
45
45
  # @param drawing Form-data file
46
46
  # @param output_type_ext For output pdf format: PDF_15, PDFa_1a OR PDFa_1b. Null for another format
47
47
  def initialize(output_format, drawing = nil, output_type_ext = nil)
@@ -32,14 +32,14 @@ module AsposeCadCloud
32
32
  #
33
33
  class PaperToCadRequest
34
34
 
35
- # Output DXF, DWG, DGN, DWF, DWFX, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, SVG file format.
35
+ # Output DXF, DWG, DGN, DWF, DWFX, DRC, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, SVG file format.
36
36
  attr_accessor :output_format
37
37
  # Form-data file
38
38
  attr_accessor :drawing
39
39
 
40
40
  #
41
41
  # Initializes a new instance.
42
- # @param output_format Output DXF, DWG, DGN, DWF, DWFX, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, SVG file format.
42
+ # @param output_format Output DXF, DWG, DGN, DWF, DWFX, DRC, IFC, STL, STP, STEP, CGM, GLB, GLTF, DWT, IGES, PLT, CF2, OBJ, HPGL, IGS, PCL, FBX, SVG file format.
43
43
  # @param drawing Form-data file
44
44
  def initialize(output_format, drawing = nil)
45
45
  self.output_format = output_format
@@ -0,0 +1,61 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="PostDrawingDracoRequest.rb">
4
+ # Copyright (c) 2018 Aspose.CAD Cloud
5
+ # </copyright>
6
+ # <summary>
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in all
15
+ # copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ # SOFTWARE.
24
+ # </summary>
25
+ # --------------------------------------------------------------------------------------------------------------------
26
+ #
27
+
28
+ module AsposeCadCloud
29
+
30
+ #
31
+ # Request model for post_drawing_draco operation.
32
+ #
33
+ class PostDrawingDracoRequest
34
+
35
+ # Filename of an input drawing on a storage.
36
+ attr_accessor :name
37
+ # Export Draco options passed as a JSON on a request body.
38
+ attr_accessor :options
39
+ # Folder with a drawing to process.
40
+ attr_accessor :folder
41
+ # Path to updated file (if this is empty, response contains streamed file).
42
+ attr_accessor :out_path
43
+ # Your Aspose Cloud Storage name.
44
+ attr_accessor :storage
45
+
46
+ #
47
+ # Initializes a new instance.
48
+ # @param name Filename of an input drawing on a storage.
49
+ # @param options Export Draco options passed as a JSON on a request body.
50
+ # @param folder Folder with a drawing to process.
51
+ # @param out_path Path to updated file (if this is empty, response contains streamed file).
52
+ # @param storage Your Aspose Cloud Storage name.
53
+ def initialize(name, options, folder = nil, out_path = nil, storage = nil)
54
+ self.name = name
55
+ self.options = options
56
+ self.folder = folder
57
+ self.out_path = out_path
58
+ self.storage = storage
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,57 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="PutDrawingDracoRequest.rb">
4
+ # Copyright (c) 2018 Aspose.CAD Cloud
5
+ # </copyright>
6
+ # <summary>
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in all
15
+ # copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ # SOFTWARE.
24
+ # </summary>
25
+ # --------------------------------------------------------------------------------------------------------------------
26
+ #
27
+
28
+ module AsposeCadCloud
29
+
30
+ #
31
+ # Request model for put_drawing_draco operation.
32
+ #
33
+ class PutDrawingDracoRequest
34
+
35
+ # Input drawing
36
+ attr_accessor :drawing_data
37
+ # Path to updated file (if this is empty, response contains streamed file).
38
+ attr_accessor :out_path
39
+ # JSON-serialized export options passed as zero-indexed multipart/form-data. Follow #/definitions/DracoOptionsDTO model definition.
40
+ attr_accessor :export_options
41
+ # Your Aspose Cloud Storage name.
42
+ attr_accessor :storage
43
+
44
+ #
45
+ # Initializes a new instance.
46
+ # @param drawing_data Input drawing
47
+ # @param out_path Path to updated file (if this is empty, response contains streamed file).
48
+ # @param export_options JSON-serialized export options passed as zero-indexed multipart/form-data. Follow #/definitions/DracoOptionsDTO model definition.
49
+ # @param storage Your Aspose Cloud Storage name.
50
+ def initialize(drawing_data, out_path = nil, export_options = nil, storage = nil)
51
+ self.drawing_data = drawing_data
52
+ self.out_path = out_path
53
+ self.export_options = export_options
54
+ self.storage = storage
55
+ end
56
+ end
57
+ end
@@ -25,5 +25,5 @@
25
25
  # --------------------------------------------------------------------------------------------------------------------
26
26
  #
27
27
  module AsposeCadCloud
28
- VERSION = "24.1".freeze
28
+ VERSION = "24.5".freeze
29
29
  end
@@ -88,6 +88,7 @@ require_relative 'aspose_cad_cloud/models/bmp_options_dto'
88
88
  require_relative 'aspose_cad_cloud/models/cad_rasterization_options_dto'
89
89
  require_relative 'aspose_cad_cloud/models/cgm_options_dto'
90
90
  require_relative 'aspose_cad_cloud/models/dicom_options_dto'
91
+ require_relative 'aspose_cad_cloud/models/draco_options_dto'
91
92
  require_relative 'aspose_cad_cloud/models/dwf_options_dto'
92
93
  require_relative 'aspose_cad_cloud/models/dxf_options_dto'
93
94
  require_relative 'aspose_cad_cloud/models/fbx_options_dto'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_cad_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: '24.1'
4
+ version: '24.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aspose
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-07 00:00:00.000000000 Z
11
+ date: 2024-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -101,6 +101,7 @@ files:
101
101
  - lib/aspose_cad_cloud/models/dgn_properties.rb
102
102
  - lib/aspose_cad_cloud/models/dicom_options_dto.rb
103
103
  - lib/aspose_cad_cloud/models/disc_usage.rb
104
+ - lib/aspose_cad_cloud/models/draco_options_dto.rb
104
105
  - lib/aspose_cad_cloud/models/drawing_options_base_dto.rb
105
106
  - lib/aspose_cad_cloud/models/dwf_options_dto.rb
106
107
  - lib/aspose_cad_cloud/models/dwf_properties.rb
@@ -168,6 +169,7 @@ files:
168
169
  - lib/aspose_cad_cloud/models/requests/PostDrawingBmpRequest.rb
169
170
  - lib/aspose_cad_cloud/models/requests/PostDrawingCgmRequest.rb
170
171
  - lib/aspose_cad_cloud/models/requests/PostDrawingDicomRequest.rb
172
+ - lib/aspose_cad_cloud/models/requests/PostDrawingDracoRequest.rb
171
173
  - lib/aspose_cad_cloud/models/requests/PostDrawingDwfRequest.rb
172
174
  - lib/aspose_cad_cloud/models/requests/PostDrawingDxfRequest.rb
173
175
  - lib/aspose_cad_cloud/models/requests/PostDrawingFbxRequest.rb
@@ -194,6 +196,7 @@ files:
194
196
  - lib/aspose_cad_cloud/models/requests/PutDrawingBmpRequest.rb
195
197
  - lib/aspose_cad_cloud/models/requests/PutDrawingCgmRequest.rb
196
198
  - lib/aspose_cad_cloud/models/requests/PutDrawingDicomRequest.rb
199
+ - lib/aspose_cad_cloud/models/requests/PutDrawingDracoRequest.rb
197
200
  - lib/aspose_cad_cloud/models/requests/PutDrawingDwfRequest.rb
198
201
  - lib/aspose_cad_cloud/models/requests/PutDrawingDxfRequest.rb
199
202
  - lib/aspose_cad_cloud/models/requests/PutDrawingFbxRequest.rb