aspose_words_cloud 22.1.0 → 22.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose_words_cloud/api_client.rb +1 -0
  3. data/lib/aspose_words_cloud/models/bmp_save_options_data.rb +12 -14
  4. data/lib/aspose_words_cloud/models/doc_save_options_data.rb +9 -11
  5. data/lib/aspose_words_cloud/models/{ooxml_save_options_data.rb → docm_save_options_data.rb} +15 -17
  6. data/lib/aspose_words_cloud/models/docx_save_options_data.rb +440 -0
  7. data/lib/aspose_words_cloud/models/dot_save_options_data.rb +426 -0
  8. data/lib/aspose_words_cloud/models/dotm_save_options_data.rb +440 -0
  9. data/lib/aspose_words_cloud/models/dotx_save_options_data.rb +440 -0
  10. data/lib/aspose_words_cloud/models/emf_save_options_data.rb +12 -14
  11. data/lib/aspose_words_cloud/models/epub_save_options_data.rb +12 -14
  12. data/lib/aspose_words_cloud/models/flat_opc_macro_save_options_data.rb +440 -0
  13. data/lib/aspose_words_cloud/models/{txt_save_options_base_data.rb → flat_opc_save_options_data.rb} +50 -54
  14. data/lib/aspose_words_cloud/models/flat_opc_template_macro_save_options_data.rb +440 -0
  15. data/lib/aspose_words_cloud/models/flat_opc_template_save_options_data.rb +440 -0
  16. data/lib/aspose_words_cloud/models/gif_save_options_data.rb +12 -14
  17. data/lib/aspose_words_cloud/models/html_fixed_save_options_data.rb +9 -11
  18. data/lib/aspose_words_cloud/models/html_save_options_data.rb +9 -11
  19. data/lib/aspose_words_cloud/models/jpeg_save_options_data.rb +12 -14
  20. data/lib/aspose_words_cloud/models/markdown_save_options_data.rb +9 -11
  21. data/lib/aspose_words_cloud/models/mhtml_save_options_data.rb +12 -14
  22. data/lib/aspose_words_cloud/models/odt_save_options_data.rb +12 -14
  23. data/lib/aspose_words_cloud/models/{fixed_page_save_options_data.rb → open_xps_save_options_data.rb} +55 -17
  24. data/lib/aspose_words_cloud/models/ott_save_options_data.rb +441 -0
  25. data/lib/aspose_words_cloud/models/pcl_save_options_data.rb +12 -14
  26. data/lib/aspose_words_cloud/models/pdf_save_options_data.rb +9 -11
  27. data/lib/aspose_words_cloud/models/png_save_options_data.rb +12 -14
  28. data/lib/aspose_words_cloud/models/ps_save_options_data.rb +9 -11
  29. data/lib/aspose_words_cloud/models/rtf_save_options_data.rb +9 -11
  30. data/lib/aspose_words_cloud/models/svg_save_options_data.rb +9 -11
  31. data/lib/aspose_words_cloud/models/text_save_options_data.rb +9 -11
  32. data/lib/aspose_words_cloud/models/tiff_save_options_data.rb +9 -11
  33. data/lib/aspose_words_cloud/models/word_ml_save_options_data.rb +12 -14
  34. data/lib/aspose_words_cloud/models/xaml_fixed_save_options_data.rb +12 -14
  35. data/lib/aspose_words_cloud/models/{save_options_data.rb → xaml_flow_pack_save_options_data.rb} +35 -17
  36. data/lib/aspose_words_cloud/models/xaml_flow_save_options_data.rb +12 -14
  37. data/lib/aspose_words_cloud/models/xps_save_options_data.rb +9 -11
  38. data/lib/aspose_words_cloud/version.rb +1 -1
  39. data/lib/aspose_words_cloud.rb +12 -10
  40. metadata +14 -12
  41. data/lib/aspose_words_cloud/models/comment_base.rb +0 -251
  42. data/lib/aspose_words_cloud/models/document_property_base.rb +0 -201
  43. data/lib/aspose_words_cloud/models/field_base.rb +0 -211
  44. data/lib/aspose_words_cloud/models/footnote_base.rb +0 -273
  45. data/lib/aspose_words_cloud/models/image_save_options_data.rb +0 -585
  46. data/lib/aspose_words_cloud/models/run_base.rb +0 -201
@@ -1,201 +0,0 @@
1
- # ------------------------------------------------------------------------------------
2
- # <copyright company="Aspose" file="run_base.rb">
3
- # Copyright (c) 2022 Aspose.Words for Cloud
4
- # </copyright>
5
- # <summary>
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in all
14
- # copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- # SOFTWARE.
23
- # </summary>
24
- # ------------------------------------------------------------------------------------
25
-
26
- require 'date'
27
-
28
- module AsposeWordsCloud
29
-
30
- # Run element.
31
- class RunBase
32
- # Gets or sets the run's text.
33
- attr_accessor :text
34
- # Attribute mapping from ruby-style variable name to JSON key.
35
- def self.attribute_map
36
- {
37
- :'text' => :'Text'
38
- }
39
- end
40
-
41
- # Attribute type mapping.
42
- def self.swagger_types
43
- {
44
- :'text' => :'String'
45
- }
46
- end
47
-
48
- # Initializes the object
49
- # @param [Hash] attributes Model attributes in the form of hash
50
- def initialize(attributes = {})
51
- return unless attributes.is_a?(Hash)
52
-
53
- # convert string to symbol for hash key
54
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
55
-
56
- if attributes.key?(:'Text')
57
- self.text = attributes[:'Text']
58
- end
59
- end
60
-
61
- # Show invalid properties with the reasons. Usually used together with valid?
62
- # @return Array for valid properies with the reasons
63
- def list_invalid_properties
64
- invalid_properties = []
65
- return invalid_properties
66
- end
67
-
68
- # Check to see if the all the properties in the model are valid
69
- # @return true if the model is valid
70
- def valid?
71
- return true
72
- end
73
-
74
- # Checks equality by comparing each attribute.
75
- # @param [Object] Object to be compared
76
- def ==(other)
77
- return true if self.equal?(other)
78
- self.class == other.class &&
79
- text == other.text
80
- end
81
-
82
- # @see the `==` method
83
- # @param [Object] Object to be compared
84
- def eql?(other)
85
- self == other
86
- end
87
-
88
- # Calculates hash code according to all attributes.
89
- # @return [Fixnum] Hash code
90
- def hash
91
- [text].hash
92
- end
93
-
94
- # Builds the object from hash
95
- # @param [Hash] attributes Model attributes in the form of hash
96
- # @return [Object] Returns the model itself
97
- def build_from_hash(attributes)
98
- return nil unless attributes.is_a?(Hash)
99
- self.class.swagger_types.each_pair do |key, type|
100
- if type =~ /\AArray<(.*)>/i
101
- # check to ensure the input is an array given that the the attribute
102
- # is documented as an array but the input is not
103
- if attributes[self.class.attribute_map[key]].is_a?(Array)
104
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
105
- end
106
- elsif !attributes[self.class.attribute_map[key]].nil?
107
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
108
- end
109
- # or else data not found in attributes(hash), not an issue as the data can be optional
110
- end
111
-
112
- self
113
- end
114
-
115
- # Deserializes the data based on type
116
- # @param string type Data type
117
- # @param string value Value to be deserialized
118
- # @return [Object] Deserialized data
119
- def _deserialize(type, value)
120
- case type.to_sym
121
- when :DateTime
122
- Time.at(/\d/.match(value)[0].to_f).to_datetime
123
- when :Date
124
- Time.at(/\d/.match(value)[0].to_f).to_date
125
- when :String
126
- value.to_s
127
- when :Integer
128
- value.to_i
129
- when :Float
130
- value.to_f
131
- when :BOOLEAN
132
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
133
- true
134
- else
135
- false
136
- end
137
- when :Object
138
- # generic object (usually a Hash), return directly
139
- value
140
- when /\AArray<(?<inner_type>.+)>\z/
141
- inner_type = Regexp.last_match[:inner_type]
142
- value.map { |v| _deserialize(inner_type, v) }
143
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
144
- k_type = Regexp.last_match[:k_type]
145
- v_type = Regexp.last_match[:v_type]
146
- {}.tap do |hash|
147
- value.each do |k, v|
148
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
149
- end
150
- end
151
- else
152
- # model
153
- temp_model = AsposeWordsCloud.const_get(type).new
154
- temp_model.build_from_hash(value)
155
- end
156
- end
157
-
158
- # Returns the string representation of the object
159
- # @return [String] String presentation of the object
160
- def to_s
161
- to_hash.to_s
162
- end
163
-
164
- # to_body is an alias to to_hash (backward compatibility)
165
- # @return [Hash] Returns the object in the form of hash
166
- def to_body
167
- to_hash
168
- end
169
-
170
- # Returns the object in the form of hash
171
- # @return [Hash] Returns the object in the form of hash
172
- def to_hash
173
- hash = {}
174
- self.class.attribute_map.each_pair do |attr, param|
175
- value = self.send(attr)
176
- next if value.nil?
177
- hash[param] = _to_hash(value)
178
- end
179
- hash
180
- end
181
-
182
- # Outputs non-array value in the form of hash
183
- # For object, use to_hash. Otherwise, just return the value
184
- # @param [Object] value Any valid value
185
- # @return [Hash] Returns the value in the form of hash
186
- def _to_hash(value)
187
- if value.is_a?(Array)
188
- value.compact.map { |v| _to_hash(v) }
189
- elsif value.is_a?(Hash)
190
- {}.tap do |hash|
191
- value.each { |k, v| hash[k] = _to_hash(v) }
192
- end
193
- elsif value.respond_to? :to_hash
194
- value.to_hash
195
- else
196
- value
197
- end
198
- end
199
-
200
- end
201
- end