aspose_diagram_cloud 18.10.3 → 19.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{aspose_diagram_cloud.gemspec → AsposeDiagramCloud.gemspec} +5 -5
- data/README.md +94 -124
- data/docs/{FileFormatRequest.md → CreateNewResponse.md} +2 -2
- data/docs/DiagramApi.md +241 -0
- data/docs/DiagramSaveOptions.md +10 -0
- data/docs/DiscUsage.md +9 -0
- data/docs/Error.md +11 -0
- data/docs/ErrorDetails.md +9 -0
- data/docs/FileVersion.md +14 -0
- data/docs/FileVersions.md +8 -0
- data/docs/FilesList.md +8 -0
- data/docs/FilesUploadResult.md +9 -0
- data/docs/HTMLSaveOptions.md +19 -0
- data/docs/ImageSaveOptions.md +29 -0
- data/docs/ModifyResponse.md +9 -0
- data/docs/OAuthApi.md +3 -3
- data/docs/ObjectExist.md +9 -0
- data/docs/PageSize.md +8 -0
- data/docs/PdfDigitalSignatureDetails.md +11 -0
- data/docs/PdfEncryptionDetails.md +11 -0
- data/docs/PdfSaveOptions.md +25 -0
- data/docs/PointF.md +10 -0
- data/docs/RectangleF.md +18 -0
- data/docs/RenderingSaveOptions.md +13 -0
- data/docs/SVGSaveOptions.md +18 -0
- data/docs/SWFSaveOptions.md +13 -0
- data/docs/SaaSposeResponse.md +0 -2
- data/docs/SaveAsResponse.md +10 -0
- data/docs/SaveOptionsModel.md +9 -0
- data/docs/SaveOptionsRequest.md +10 -0
- data/docs/StorageApi.md +799 -0
- data/docs/StorageExist.md +8 -0
- data/docs/StorageFile.md +12 -0
- data/docs/{SharpModel.md → UploadResponse.md} +2 -2
- data/docs/XAMLSaveOptions.md +12 -0
- data/docs/XPSSaveOptions.md +13 -0
- data/lib/AsposeDiagramCloud.rb +74 -0
- data/lib/AsposeDiagramCloud/api/diagram_api.rb +300 -0
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/api/o_auth_api.rb +3 -3
- data/lib/AsposeDiagramCloud/api/storage_api.rb +905 -0
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/api_client.rb +7 -4
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/api_error.rb +2 -2
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/configuration.rb +4 -18
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/models/access_token_response.rb +2 -2
- data/lib/{aspose_diagram_cloud/models/file_format_request.rb → AsposeDiagramCloud/models/create_new_response.rb} +10 -10
- data/lib/AsposeDiagramCloud/models/diagram_save_options.rb +244 -0
- data/lib/{aspose_diagram_cloud/models/link.rb → AsposeDiagramCloud/models/disc_usage.rb} +29 -35
- data/lib/AsposeDiagramCloud/models/error.rb +219 -0
- data/lib/{aspose_diagram_cloud/models/saa_spose_response.rb → AsposeDiagramCloud/models/error_details.rb} +22 -20
- data/lib/AsposeDiagramCloud/models/file_version.rb +264 -0
- data/lib/{aspose_diagram_cloud/models/page_model.rb → AsposeDiagramCloud/models/file_versions.rb} +13 -21
- data/lib/AsposeDiagramCloud/models/files_list.rb +191 -0
- data/lib/AsposeDiagramCloud/models/files_upload_result.rb +203 -0
- data/lib/AsposeDiagramCloud/models/html_save_options.rb +330 -0
- data/lib/AsposeDiagramCloud/models/image_save_options.rb +492 -0
- data/lib/AsposeDiagramCloud/models/modify_response.rb +202 -0
- data/lib/{aspose_diagram_cloud/models/diagram_response.rb → AsposeDiagramCloud/models/object_exist.rb} +27 -29
- data/lib/AsposeDiagramCloud/models/page_size.rb +221 -0
- data/lib/AsposeDiagramCloud/models/pdf_digital_signature_details.rb +248 -0
- data/lib/AsposeDiagramCloud/models/pdf_encryption_details.rb +260 -0
- data/lib/AsposeDiagramCloud/models/pdf_save_options.rb +408 -0
- data/lib/{aspose_diagram_cloud/models/save_result.rb → AsposeDiagramCloud/models/point_f.rb} +37 -24
- data/lib/AsposeDiagramCloud/models/rectangle_f.rb +333 -0
- data/lib/AsposeDiagramCloud/models/rendering_save_options.rb +276 -0
- data/lib/{aspose_diagram_cloud/models/sharp_model.rb → AsposeDiagramCloud/models/saa_spose_response.rb} +5 -14
- data/lib/{aspose_diagram_cloud/models/save_response.rb → AsposeDiagramCloud/models/save_as_response.rb} +24 -27
- data/lib/AsposeDiagramCloud/models/save_options_model.rb +235 -0
- data/lib/{aspose_diagram_cloud/models/diagram_model.rb → AsposeDiagramCloud/models/save_options_request.rb} +19 -12
- data/lib/AsposeDiagramCloud/models/storage_exist.rb +194 -0
- data/lib/AsposeDiagramCloud/models/storage_file.rb +239 -0
- data/lib/AsposeDiagramCloud/models/svg_save_options.rb +321 -0
- data/lib/AsposeDiagramCloud/models/swf_save_options.rb +271 -0
- data/lib/AsposeDiagramCloud/models/upload_response.rb +188 -0
- data/lib/AsposeDiagramCloud/models/xaml_save_options.rb +262 -0
- data/lib/AsposeDiagramCloud/models/xps_save_options.rb +271 -0
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/version.rb +3 -3
- data/spec/api/test_convert_spec.rb +308 -0
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +5 -5
- data/spec/spec_helper.rb +10 -6
- data/testData/FileUpload.vdx +437 -0
- metadata +80 -55
- data/docs/DiagramFileApi.md +0 -228
- data/docs/DiagramModel.md +0 -9
- data/docs/DiagramResponse.md +0 -10
- data/docs/Link.md +0 -11
- data/docs/PageModel.md +0 -9
- data/docs/SaveResponse.md +0 -10
- data/docs/SaveResult.md +0 -10
- data/lib/aspose_diagram_cloud.rb +0 -51
- data/lib/aspose_diagram_cloud/api/diagram_file_api.rb +0 -304
- data/spec/api/diagram_file_api_spec.rb +0 -118
- data/spec/api/o_auth_api_spec.rb +0 -56
- data/spec/models/access_token_response_spec.rb +0 -84
- data/spec/models/diagram_model_spec.rb +0 -48
- data/spec/models/diagram_response_spec.rb +0 -54
- data/spec/models/file_format_request_spec.rb +0 -42
- data/spec/models/link_spec.rb +0 -60
- data/spec/models/page_model_spec.rb +0 -48
- data/spec/models/saa_spose_response_spec.rb +0 -48
- data/spec/models/save_response_spec.rb +0 -54
- data/spec/models/save_result_spec.rb +0 -54
- data/spec/models/sharp_model_spec.rb +0 -42
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#Aspose.Diagram Cloud API Reference
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 3.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -49,6 +49,7 @@ module AsposeDiagramCloud
|
|
49
49
|
def call_api(http_method, path, opts = {})
|
50
50
|
request = build_request(http_method, path, opts)
|
51
51
|
response = request.run
|
52
|
+
|
52
53
|
if @config.debugging
|
53
54
|
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
54
55
|
end
|
@@ -93,7 +94,7 @@ module AsposeDiagramCloud
|
|
93
94
|
query_params = opts[:query_params] || {}
|
94
95
|
form_params = opts[:form_params] || {}
|
95
96
|
|
96
|
-
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
97
|
+
#update_params_for_auth! header_params, query_params, opts[:auth_names]
|
97
98
|
|
98
99
|
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
|
99
100
|
_verify_ssl_host = @config.verify_ssl_host ? 2 : 0
|
@@ -279,7 +280,9 @@ module AsposeDiagramCloud
|
|
279
280
|
data = {}
|
280
281
|
form_params.each do |key, value|
|
281
282
|
case value
|
282
|
-
when File
|
283
|
+
when ::File
|
284
|
+
data[key] = Faraday::UploadIO.new(value.path, MimeMagic.by_magic(value).to_s, key)
|
285
|
+
when ::Array, nil
|
283
286
|
# let typhoeus handle File, Array and nil parameters
|
284
287
|
data[key] = value
|
285
288
|
else
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#Aspose.Diagram Cloud API Reference
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 3.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#Aspose.Diagram Cloud API Reference
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 3.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -130,7 +130,7 @@ module AsposeDiagramCloud
|
|
130
130
|
def initialize
|
131
131
|
@scheme = 'https'
|
132
132
|
@host = 'api.aspose.cloud'
|
133
|
-
@base_path = '/
|
133
|
+
@base_path = '/v3.0'
|
134
134
|
@api_key = {}
|
135
135
|
@api_key_prefix = {}
|
136
136
|
@timeout = 0
|
@@ -196,27 +196,13 @@ module AsposeDiagramCloud
|
|
196
196
|
# Returns Auth Settings hash for api client.
|
197
197
|
def auth_settings
|
198
198
|
{
|
199
|
-
'
|
200
|
-
{
|
201
|
-
type: 'api_key',
|
202
|
-
in: 'query',
|
203
|
-
key: 'appsid',
|
204
|
-
value: api_key_with_prefix('appsid')
|
205
|
-
},
|
206
|
-
'oauth' =>
|
199
|
+
'JWT' =>
|
207
200
|
{
|
208
201
|
type: 'oauth2',
|
209
202
|
in: 'header',
|
210
203
|
key: 'Authorization',
|
211
204
|
value: "Bearer #{access_token}"
|
212
205
|
},
|
213
|
-
'signature' =>
|
214
|
-
{
|
215
|
-
type: 'api_key',
|
216
|
-
in: 'query',
|
217
|
-
key: 'signature',
|
218
|
-
value: api_key_with_prefix('signature')
|
219
|
-
},
|
220
206
|
}
|
221
207
|
end
|
222
208
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#Aspose.Diagram Cloud API Reference
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 3.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#Aspose.Diagram Cloud API Reference
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 3.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -14,21 +14,21 @@ require 'date'
|
|
14
14
|
|
15
15
|
module AsposeDiagramCloud
|
16
16
|
|
17
|
-
class
|
18
|
-
attr_accessor :
|
17
|
+
class CreateNewResponse
|
18
|
+
attr_accessor :created
|
19
19
|
|
20
20
|
|
21
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
22
|
def self.attribute_map
|
23
23
|
{
|
24
|
-
:'
|
24
|
+
:'created' => :'Created'
|
25
25
|
}
|
26
26
|
end
|
27
27
|
|
28
28
|
# Attribute type mapping.
|
29
29
|
def self.swagger_types
|
30
30
|
{
|
31
|
-
:'
|
31
|
+
:'created' => :'String'
|
32
32
|
}
|
33
33
|
end
|
34
34
|
|
@@ -40,8 +40,8 @@ module AsposeDiagramCloud
|
|
40
40
|
# convert string to symbol for hash key
|
41
41
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
42
|
|
43
|
-
if attributes.has_key?(:'
|
44
|
-
self.
|
43
|
+
if attributes.has_key?(:'Created')
|
44
|
+
self.created = attributes[:'Created']
|
45
45
|
end
|
46
46
|
|
47
47
|
end
|
@@ -64,7 +64,7 @@ module AsposeDiagramCloud
|
|
64
64
|
def ==(o)
|
65
65
|
return true if self.equal?(o)
|
66
66
|
self.class == o.class &&
|
67
|
-
|
67
|
+
created == o.created
|
68
68
|
end
|
69
69
|
|
70
70
|
# @see the `==` method
|
@@ -76,7 +76,7 @@ module AsposeDiagramCloud
|
|
76
76
|
# Calculates hash code according to all attributes.
|
77
77
|
# @return [Fixnum] Hash code
|
78
78
|
def hash
|
79
|
-
[
|
79
|
+
[created].hash
|
80
80
|
end
|
81
81
|
|
82
82
|
# Builds the object from hash
|
@@ -0,0 +1,244 @@
|
|
1
|
+
=begin
|
2
|
+
#Aspose.Diagram Cloud API Reference
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module AsposeDiagramCloud
|
16
|
+
|
17
|
+
class DiagramSaveOptions
|
18
|
+
attr_accessor :save_format
|
19
|
+
|
20
|
+
attr_accessor :default_font
|
21
|
+
|
22
|
+
attr_accessor :auto_fit_page_to_drawing_content
|
23
|
+
|
24
|
+
class EnumAttributeValidator
|
25
|
+
attr_reader :datatype
|
26
|
+
attr_reader :allowable_values
|
27
|
+
|
28
|
+
def initialize(datatype, allowable_values)
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
30
|
+
case datatype.to_s
|
31
|
+
when /Integer/i
|
32
|
+
value.to_i
|
33
|
+
when /Float/i
|
34
|
+
value.to_f
|
35
|
+
else
|
36
|
+
value
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def valid?(value)
|
42
|
+
!value || allowable_values.include?(value)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'save_format' => :'SaveFormat',
|
50
|
+
:'default_font' => :'DefaultFont',
|
51
|
+
:'auto_fit_page_to_drawing_content' => :'AutoFitPageToDrawingContent'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Attribute type mapping.
|
56
|
+
def self.swagger_types
|
57
|
+
{
|
58
|
+
:'save_format' => :'String',
|
59
|
+
:'default_font' => :'String',
|
60
|
+
:'auto_fit_page_to_drawing_content' => :'BOOLEAN'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Initializes the object
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
66
|
+
def initialize(attributes = {})
|
67
|
+
return unless attributes.is_a?(Hash)
|
68
|
+
|
69
|
+
# convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
71
|
+
|
72
|
+
if attributes.has_key?(:'SaveFormat')
|
73
|
+
self.save_format = attributes[:'SaveFormat']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.has_key?(:'DefaultFont')
|
77
|
+
self.default_font = attributes[:'DefaultFont']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.has_key?(:'AutoFitPageToDrawingContent')
|
81
|
+
self.auto_fit_page_to_drawing_content = attributes[:'AutoFitPageToDrawingContent']
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
87
|
+
# @return Array for valid properies with the reasons
|
88
|
+
def list_invalid_properties
|
89
|
+
invalid_properties = Array.new
|
90
|
+
if @save_format.nil?
|
91
|
+
invalid_properties.push("invalid value for 'save_format', save_format cannot be nil.")
|
92
|
+
end
|
93
|
+
|
94
|
+
return invalid_properties
|
95
|
+
end
|
96
|
+
|
97
|
+
# Check to see if the all the properties in the model are valid
|
98
|
+
# @return true if the model is valid
|
99
|
+
def valid?
|
100
|
+
return false if @save_format.nil?
|
101
|
+
save_format_validator = EnumAttributeValidator.new('String', ["VDX", "VSX", "VTX", "TIFF", "PNG", "BMP", "EMF", "JPEG", "PDF", "XPS", "GIF", "HTML", "SVG", "SWF", "XAML", "VSDX", "VSTX", "VSSX", "VSDM", "VSSM", "VSTM"])
|
102
|
+
return false unless save_format_validator.valid?(@save_format)
|
103
|
+
return true
|
104
|
+
end
|
105
|
+
|
106
|
+
# Custom attribute writer method checking allowed values (enum).
|
107
|
+
# @param [Object] save_format Object to be assigned
|
108
|
+
def save_format=(save_format)
|
109
|
+
validator = EnumAttributeValidator.new('String', ["VDX", "VSX", "VTX", "TIFF", "PNG", "BMP", "EMF", "JPEG", "PDF", "XPS", "GIF", "HTML", "SVG", "SWF", "XAML", "VSDX", "VSTX", "VSSX", "VSDM", "VSSM", "VSTM"])
|
110
|
+
unless validator.valid?(save_format)
|
111
|
+
fail ArgumentError, "invalid value for 'save_format', must be one of #{validator.allowable_values}."
|
112
|
+
end
|
113
|
+
@save_format = save_format
|
114
|
+
end
|
115
|
+
|
116
|
+
# Checks equality by comparing each attribute.
|
117
|
+
# @param [Object] Object to be compared
|
118
|
+
def ==(o)
|
119
|
+
return true if self.equal?(o)
|
120
|
+
self.class == o.class &&
|
121
|
+
save_format == o.save_format &&
|
122
|
+
default_font == o.default_font &&
|
123
|
+
auto_fit_page_to_drawing_content == o.auto_fit_page_to_drawing_content
|
124
|
+
end
|
125
|
+
|
126
|
+
# @see the `==` method
|
127
|
+
# @param [Object] Object to be compared
|
128
|
+
def eql?(o)
|
129
|
+
self == o
|
130
|
+
end
|
131
|
+
|
132
|
+
# Calculates hash code according to all attributes.
|
133
|
+
# @return [Fixnum] Hash code
|
134
|
+
def hash
|
135
|
+
[save_format, default_font, auto_fit_page_to_drawing_content].hash
|
136
|
+
end
|
137
|
+
|
138
|
+
# Builds the object from hash
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
+
# @return [Object] Returns the model itself
|
141
|
+
def build_from_hash(attributes)
|
142
|
+
return nil unless attributes.is_a?(Hash)
|
143
|
+
self.class.swagger_types.each_pair do |key, type|
|
144
|
+
if type =~ /\AArray<(.*)>/i
|
145
|
+
# check to ensure the input is an array given that the the attribute
|
146
|
+
# is documented as an array but the input is not
|
147
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
148
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
149
|
+
end
|
150
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
151
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
152
|
+
end # 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
|
+
DateTime.parse(value)
|
166
|
+
when :Date
|
167
|
+
Date.parse(value)
|
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 # model
|
195
|
+
temp_model = AsposeDiagramCloud.const_get(type).new
|
196
|
+
temp_model.build_from_hash(value)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
# Returns the string representation of the object
|
201
|
+
# @return [String] String presentation of the object
|
202
|
+
def to_s
|
203
|
+
to_hash.to_s
|
204
|
+
end
|
205
|
+
|
206
|
+
# to_body is an alias to to_hash (backward compatibility)
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
208
|
+
def to_body
|
209
|
+
to_hash
|
210
|
+
end
|
211
|
+
|
212
|
+
# Returns the object in the form of hash
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
214
|
+
def to_hash
|
215
|
+
hash = {}
|
216
|
+
self.class.attribute_map.each_pair do |attr, param|
|
217
|
+
value = self.send(attr)
|
218
|
+
next if value.nil?
|
219
|
+
hash[param] = _to_hash(value)
|
220
|
+
end
|
221
|
+
hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Outputs non-array value in the form of hash
|
225
|
+
# For object, use to_hash. Otherwise, just return the value
|
226
|
+
# @param [Object] value Any valid value
|
227
|
+
# @return [Hash] Returns the value in the form of hash
|
228
|
+
def _to_hash(value)
|
229
|
+
if value.is_a?(Array)
|
230
|
+
value.compact.map{ |v| _to_hash(v) }
|
231
|
+
elsif value.is_a?(Hash)
|
232
|
+
{}.tap do |hash|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
234
|
+
end
|
235
|
+
elsif value.respond_to? :to_hash
|
236
|
+
value.to_hash
|
237
|
+
else
|
238
|
+
value
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#Aspose.Diagram Cloud API Reference
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 3.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -13,34 +13,28 @@ Swagger Codegen version: 2.3.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module AsposeDiagramCloud
|
16
|
+
# Class for disc space information.
|
17
|
+
class DiscUsage
|
18
|
+
# Application used disc space.
|
19
|
+
attr_accessor :used_size
|
16
20
|
|
17
|
-
|
18
|
-
attr_accessor :
|
19
|
-
|
20
|
-
attr_accessor :type
|
21
|
-
|
22
|
-
attr_accessor :rel
|
23
|
-
|
24
|
-
attr_accessor :title
|
21
|
+
# Total disc space.
|
22
|
+
attr_accessor :total_size
|
25
23
|
|
26
24
|
|
27
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
26
|
def self.attribute_map
|
29
27
|
{
|
30
|
-
:'
|
31
|
-
:'
|
32
|
-
:'rel' => :'Rel',
|
33
|
-
:'title' => :'Title'
|
28
|
+
:'used_size' => :'UsedSize',
|
29
|
+
:'total_size' => :'TotalSize'
|
34
30
|
}
|
35
31
|
end
|
36
32
|
|
37
33
|
# Attribute type mapping.
|
38
34
|
def self.swagger_types
|
39
35
|
{
|
40
|
-
:'
|
41
|
-
:'
|
42
|
-
:'rel' => :'String',
|
43
|
-
:'title' => :'String'
|
36
|
+
:'used_size' => :'Integer',
|
37
|
+
:'total_size' => :'Integer'
|
44
38
|
}
|
45
39
|
end
|
46
40
|
|
@@ -52,20 +46,12 @@ module AsposeDiagramCloud
|
|
52
46
|
# convert string to symbol for hash key
|
53
47
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
54
48
|
|
55
|
-
if attributes.has_key?(:'
|
56
|
-
self.
|
49
|
+
if attributes.has_key?(:'UsedSize')
|
50
|
+
self.used_size = attributes[:'UsedSize']
|
57
51
|
end
|
58
52
|
|
59
|
-
if attributes.has_key?(:'
|
60
|
-
self.
|
61
|
-
end
|
62
|
-
|
63
|
-
if attributes.has_key?(:'Rel')
|
64
|
-
self.rel = attributes[:'Rel']
|
65
|
-
end
|
66
|
-
|
67
|
-
if attributes.has_key?(:'Title')
|
68
|
-
self.title = attributes[:'Title']
|
53
|
+
if attributes.has_key?(:'TotalSize')
|
54
|
+
self.total_size = attributes[:'TotalSize']
|
69
55
|
end
|
70
56
|
|
71
57
|
end
|
@@ -74,12 +60,22 @@ module AsposeDiagramCloud
|
|
74
60
|
# @return Array for valid properies with the reasons
|
75
61
|
def list_invalid_properties
|
76
62
|
invalid_properties = Array.new
|
63
|
+
if @used_size.nil?
|
64
|
+
invalid_properties.push("invalid value for 'used_size', used_size cannot be nil.")
|
65
|
+
end
|
66
|
+
|
67
|
+
if @total_size.nil?
|
68
|
+
invalid_properties.push("invalid value for 'total_size', total_size cannot be nil.")
|
69
|
+
end
|
70
|
+
|
77
71
|
return invalid_properties
|
78
72
|
end
|
79
73
|
|
80
74
|
# Check to see if the all the properties in the model are valid
|
81
75
|
# @return true if the model is valid
|
82
76
|
def valid?
|
77
|
+
return false if @used_size.nil?
|
78
|
+
return false if @total_size.nil?
|
83
79
|
return true
|
84
80
|
end
|
85
81
|
|
@@ -88,10 +84,8 @@ module AsposeDiagramCloud
|
|
88
84
|
def ==(o)
|
89
85
|
return true if self.equal?(o)
|
90
86
|
self.class == o.class &&
|
91
|
-
|
92
|
-
|
93
|
-
rel == o.rel &&
|
94
|
-
title == o.title
|
87
|
+
used_size == o.used_size &&
|
88
|
+
total_size == o.total_size
|
95
89
|
end
|
96
90
|
|
97
91
|
# @see the `==` method
|
@@ -103,7 +97,7 @@ module AsposeDiagramCloud
|
|
103
97
|
# Calculates hash code according to all attributes.
|
104
98
|
# @return [Fixnum] Hash code
|
105
99
|
def hash
|
106
|
-
[
|
100
|
+
[used_size, total_size].hash
|
107
101
|
end
|
108
102
|
|
109
103
|
# Builds the object from hash
|