aspose_cad_cloud 19.11 → 20.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose_cad_cloud.rb +10 -0
  3. data/lib/aspose_cad_cloud/api/cad_api.rb +1118 -168
  4. data/lib/aspose_cad_cloud/api_client.rb +2 -1
  5. data/lib/aspose_cad_cloud/configuration.rb +1 -4
  6. data/lib/aspose_cad_cloud/models/color.rb +1 -9
  7. data/lib/aspose_cad_cloud/models/disc_usage.rb +227 -0
  8. data/lib/aspose_cad_cloud/models/error.rb +237 -0
  9. data/lib/aspose_cad_cloud/models/error_details.rb +222 -0
  10. data/lib/aspose_cad_cloud/models/file_version.rb +282 -0
  11. data/lib/aspose_cad_cloud/models/file_versions.rb +209 -0
  12. data/lib/aspose_cad_cloud/models/files_list.rb +209 -0
  13. data/lib/aspose_cad_cloud/models/files_upload_result.rb +221 -0
  14. data/lib/aspose_cad_cloud/models/graphics_options.rb +1 -4
  15. data/lib/aspose_cad_cloud/models/object_exist.rb +227 -0
  16. data/lib/aspose_cad_cloud/models/pdf_document_info.rb +1 -5
  17. data/lib/aspose_cad_cloud/models/pdf_document_options.rb +1 -2
  18. data/lib/aspose_cad_cloud/models/pen_options.rb +1 -3
  19. data/lib/aspose_cad_cloud/models/rd_optimizer_settings.rb +1 -8
  20. data/lib/aspose_cad_cloud/models/requests/CopyFileRequest.rb +61 -0
  21. data/lib/aspose_cad_cloud/models/requests/CopyFolderRequest.rb +57 -0
  22. data/lib/aspose_cad_cloud/models/requests/CreateFolderRequest.rb +49 -0
  23. data/lib/aspose_cad_cloud/models/requests/DeleteFileRequest.rb +53 -0
  24. data/lib/aspose_cad_cloud/models/requests/DeleteFolderRequest.rb +53 -0
  25. data/lib/aspose_cad_cloud/models/requests/DownloadFileRequest.rb +53 -0
  26. data/lib/aspose_cad_cloud/models/requests/GetDiscUsageRequest.rb +45 -0
  27. data/lib/aspose_cad_cloud/models/requests/GetDrawingRotateFlipRequest.rb +2 -2
  28. data/lib/aspose_cad_cloud/models/requests/GetFileVersionsRequest.rb +49 -0
  29. data/lib/aspose_cad_cloud/models/requests/GetFilesListRequest.rb +49 -0
  30. data/lib/aspose_cad_cloud/models/requests/MoveFileRequest.rb +61 -0
  31. data/lib/aspose_cad_cloud/models/requests/MoveFolderRequest.rb +57 -0
  32. data/lib/aspose_cad_cloud/models/requests/ObjectExistsRequest.rb +53 -0
  33. data/lib/aspose_cad_cloud/models/requests/PostDrawingRotateFlipRequest.rb +2 -2
  34. data/lib/aspose_cad_cloud/models/requests/StorageExistsRequest.rb +45 -0
  35. data/lib/aspose_cad_cloud/models/requests/UploadFileRequest.rb +53 -0
  36. data/lib/aspose_cad_cloud/models/resolution_setting.rb +1 -3
  37. data/lib/aspose_cad_cloud/models/storage_exist.rb +212 -0
  38. data/lib/aspose_cad_cloud/models/storage_file.rb +257 -0
  39. data/lib/aspose_cad_cloud/version.rb +1 -1
  40. metadata +36 -31
@@ -29,15 +29,12 @@ module AsposeCadCloud
29
29
  # --------------------------------------------------------------------------------------------------------------------
30
30
  #
31
31
 
32
- # Represents graphics options for embedded bitmap.
32
+
33
33
  class GraphicsOptions
34
- # Gets or sets text rendering hint.
35
34
  attr_accessor :text_rendering_hint
36
35
 
37
- # Gets or sets smoothing mode.
38
36
  attr_accessor :smoothing_mode
39
37
 
40
- # Gets or sets interpolation mode.
41
38
  attr_accessor :interpolation_mode
42
39
 
43
40
  class EnumAttributeValidator
@@ -0,0 +1,227 @@
1
+
2
+ require 'date'
3
+
4
+ module AsposeCadCloud
5
+ #
6
+ # --------------------------------------------------------------------------------------------------------------------
7
+ # <copyright company="Aspose" file="ObjectExist.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
+ # Object exists
33
+ class ObjectExist
34
+ # Indicates that the file or folder exists.
35
+ attr_accessor :exists
36
+
37
+ # True if it is a folder, false if it is a file.
38
+ attr_accessor :is_folder
39
+
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'exists' => :'Exists',
45
+ :'is_folder' => :'IsFolder'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.swagger_types
51
+ {
52
+ :'exists' => :'BOOLEAN',
53
+ :'is_folder' => :'BOOLEAN'
54
+ }
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ return unless attributes.is_a?(Hash)
61
+
62
+ # convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
64
+
65
+ if attributes.key?(:'Exists')
66
+ self.exists = attributes[:'Exists']
67
+ end
68
+
69
+ if attributes.key?(:'IsFolder')
70
+ self.is_folder = attributes[:'IsFolder']
71
+ end
72
+
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properies with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = []
79
+ if @exists.nil?
80
+ invalid_properties.push("invalid value for 'exists', exists cannot be nil.")
81
+ end
82
+
83
+ if @is_folder.nil?
84
+ invalid_properties.push("invalid value for 'is_folder', is_folder cannot be nil.")
85
+ end
86
+
87
+ return invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ return false if @exists.nil?
94
+ return false if @is_folder.nil?
95
+ return true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(other)
101
+ return true if self.equal?(other)
102
+ self.class == other.class &&
103
+ exists == other.exists &&
104
+ is_folder == other.is_folder
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(other)
110
+ self == other
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Fixnum] Hash code
115
+ def hash
116
+ [exists, is_folder].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def build_from_hash(attributes)
123
+ return nil unless attributes.is_a?(Hash)
124
+ self.class.swagger_types.each_pair do |key, type|
125
+ if type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end
134
+ # or else data not found in attributes(hash), not an issue as the data can be optional
135
+ end
136
+
137
+ self
138
+ end
139
+
140
+ # Deserializes the data based on type
141
+ # @param string type Data type
142
+ # @param string value Value to be deserialized
143
+ # @return [Object] Deserialized data
144
+ def _deserialize(type, value)
145
+ case type.to_sym
146
+ when :DateTime
147
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
148
+ when :Date
149
+ Time.at(/\d/.match(value)[0].to_f).to_date
150
+ when :String
151
+ value.to_s
152
+ when :Integer
153
+ value.to_i
154
+ when :Float
155
+ value.to_f
156
+ when :BOOLEAN
157
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
+ true
159
+ else
160
+ false
161
+ end
162
+ when :Object
163
+ # generic object (usually a Hash), return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else
177
+ # model
178
+ temp_model = AsposeCadCloud.const_get(type).new
179
+ temp_model.build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ next if value.nil?
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+
225
+ end
226
+
227
+ end
@@ -29,18 +29,14 @@ module AsposeCadCloud
29
29
  # --------------------------------------------------------------------------------------------------------------------
30
30
  #
31
31
 
32
- # This class represents set of metadata for document description.
32
+
33
33
  class PdfDocumentInfo
34
- # Gets or sets keywords of the document.
35
34
  attr_accessor :keywords
36
35
 
37
- # Gets or sets title of the document.
38
36
  attr_accessor :title
39
37
 
40
- # Gets or sets author of the document.
41
38
  attr_accessor :author
42
39
 
43
- # Gets or sets subject of the document.
44
40
  attr_accessor :subject
45
41
 
46
42
 
@@ -29,9 +29,8 @@ module AsposeCadCloud
29
29
  # --------------------------------------------------------------------------------------------------------------------
30
30
  #
31
31
 
32
- # The PDF options.
32
+
33
33
  class PdfDocumentOptions
34
- # Desired conformance level for generated PDF document. Important note: This option should not be changed after PdfDocument object is constructed. Default is Pdf15.
35
34
  attr_accessor :compliance
36
35
 
37
36
  class EnumAttributeValidator
@@ -29,12 +29,10 @@ module AsposeCadCloud
29
29
  # --------------------------------------------------------------------------------------------------------------------
30
30
  #
31
31
 
32
- # Drawing pen options
32
+
33
33
  class PenOptions
34
- # Gets or sets the start cap.
35
34
  attr_accessor :start_cap
36
35
 
37
- # Gets or sets the end cap.
38
36
  attr_accessor :end_cap
39
37
 
40
38
  class EnumAttributeValidator
@@ -29,27 +29,20 @@ module AsposeCadCloud
29
29
  # --------------------------------------------------------------------------------------------------------------------
30
30
  #
31
31
 
32
- # RD optimizer settings class
32
+
33
33
  class RdOptimizerSettings
34
- # Gets or sets the BPP (bits per pixel) scale factor.
35
34
  attr_accessor :bpp_scale
36
35
 
37
- # Gets or sets the maximum R value for consideration in in bits per pixel
38
36
  attr_accessor :bpp_max
39
37
 
40
- # Gets or sets the maximum quantization value.
41
38
  attr_accessor :max_q
42
39
 
43
- # Gets the minimum allowed quantization value.
44
40
  attr_accessor :min_q
45
41
 
46
- # Gets the maximum pixel value.
47
42
  attr_accessor :max_pixel_value
48
43
 
49
- # Gets the PSNR maximum expected value.
50
44
  attr_accessor :psnr_max
51
45
 
52
- # Gets the maximum R value for consideration.
53
46
  attr_accessor :discretized_bpp_max
54
47
 
55
48
 
@@ -0,0 +1,61 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="CopyFileRequest.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 copy_file operation.
32
+ #
33
+ class CopyFileRequest
34
+
35
+ # Source file path e.g. '/folder/file.ext'
36
+ attr_accessor :src_path
37
+ # Destination file path
38
+ attr_accessor :dest_path
39
+ # Source storage name
40
+ attr_accessor :src_storage_name
41
+ # Destination storage name
42
+ attr_accessor :dest_storage_name
43
+ # File version ID to copy
44
+ attr_accessor :version_id
45
+
46
+ #
47
+ # Initializes a new instance.
48
+ # @param src_path Source file path e.g. '/folder/file.ext'
49
+ # @param dest_path Destination file path
50
+ # @param src_storage_name Source storage name
51
+ # @param dest_storage_name Destination storage name
52
+ # @param version_id File version ID to copy
53
+ def initialize(src_path, dest_path, src_storage_name = nil, dest_storage_name = nil, version_id = nil)
54
+ self.src_path = src_path
55
+ self.dest_path = dest_path
56
+ self.src_storage_name = src_storage_name
57
+ self.dest_storage_name = dest_storage_name
58
+ self.version_id = version_id
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,57 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="CopyFolderRequest.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 copy_folder operation.
32
+ #
33
+ class CopyFolderRequest
34
+
35
+ # Source folder path e.g. '/src'
36
+ attr_accessor :src_path
37
+ # Destination folder path e.g. '/dst'
38
+ attr_accessor :dest_path
39
+ # Source storage name
40
+ attr_accessor :src_storage_name
41
+ # Destination storage name
42
+ attr_accessor :dest_storage_name
43
+
44
+ #
45
+ # Initializes a new instance.
46
+ # @param src_path Source folder path e.g. '/src'
47
+ # @param dest_path Destination folder path e.g. '/dst'
48
+ # @param src_storage_name Source storage name
49
+ # @param dest_storage_name Destination storage name
50
+ def initialize(src_path, dest_path, src_storage_name = nil, dest_storage_name = nil)
51
+ self.src_path = src_path
52
+ self.dest_path = dest_path
53
+ self.src_storage_name = src_storage_name
54
+ self.dest_storage_name = dest_storage_name
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,49 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="CreateFolderRequest.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 create_folder operation.
32
+ #
33
+ class CreateFolderRequest
34
+
35
+ # Folder path to create e.g. 'folder_1/folder_2/'
36
+ attr_accessor :path
37
+ # Storage name
38
+ attr_accessor :storage_name
39
+
40
+ #
41
+ # Initializes a new instance.
42
+ # @param path Folder path to create e.g. 'folder_1/folder_2/'
43
+ # @param storage_name Storage name
44
+ def initialize(path, storage_name = nil)
45
+ self.path = path
46
+ self.storage_name = storage_name
47
+ end
48
+ end
49
+ end