groupdocs_conversion_cloud 21.9 → 21.10

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
  SHA1:
3
- metadata.gz: 5ee2e3918b60f653905688319f5fd3733c14256d
4
- data.tar.gz: 32824c1cc5393f1f301d3bd6fe2ace0feb8b1ffa
3
+ metadata.gz: 3be17c2fe263bae3b5889aa0d992ccbabf1939ff
4
+ data.tar.gz: 16614c047dc40a8cbd738f29d912dfd46d0d7954
5
5
  SHA512:
6
- metadata.gz: a464eac38085bacdd3073fbd916a8ccba9475ecf47989af0477dd43f94f52eabeb11afb50f7ee0047b42f38e90bf166312ecc432c8ffe7f4b1de10bdddfc9cbc
7
- data.tar.gz: bc0052f688054717577b0965c0c1405edb686ca292bc36f8ed3f4359409eeca76b0696868859a7772758860a3556a66ab179d0bc034310181a4b9967cd8dfad1
6
+ metadata.gz: 17e7015ecf96f2cbd4a7904a53bf0bdeab2a37ca8ec185194d988a603f79878ddf5a9f917e87ed32dfe2d5b4c00d9acbeac7b4f5ebf3455f24065514eb0d46cc
7
+ data.tar.gz: 26e5c06321f8dd63c5358b02c20d842b36151be1bd7e6cbd638daa8397c5374556756b44a1cdc49dfebb6d75af5e4aac2a46653215f3961f2a32dfb3aeb72c0c
@@ -58,6 +58,30 @@ module GroupDocsConversionCloud
58
58
  # Watermark specific options
59
59
  attr_accessor :watermark_options
60
60
 
61
+ # Recognition mode when converting from pdf
62
+ attr_accessor :pdf_recognition_mode
63
+ class EnumAttributeValidator
64
+ attr_reader :datatype
65
+ attr_reader :allowable_values
66
+
67
+ def initialize(datatype, allowable_values)
68
+ @allowable_values = allowable_values.map do |value|
69
+ case datatype.to_s
70
+ when /Integer/i
71
+ value.to_i
72
+ when /Float/i
73
+ value.to_f
74
+ else
75
+ value
76
+ end
77
+ end
78
+ end
79
+
80
+ def valid?(value)
81
+ !value || allowable_values.include?(value)
82
+ end
83
+ end
84
+
61
85
  # Attribute mapping from ruby-style variable name to JSON key.
62
86
  def self.attribute_map
63
87
  {
@@ -69,7 +93,8 @@ module GroupDocsConversionCloud
69
93
  :'dpi' => :'Dpi',
70
94
  :'password' => :'Password',
71
95
  :'zoom' => :'Zoom',
72
- :'watermark_options' => :'WatermarkOptions'
96
+ :'watermark_options' => :'WatermarkOptions',
97
+ :'pdf_recognition_mode' => :'PdfRecognitionMode'
73
98
  }
74
99
  end
75
100
 
@@ -84,7 +109,8 @@ module GroupDocsConversionCloud
84
109
  :'dpi' => :'Float',
85
110
  :'password' => :'String',
86
111
  :'zoom' => :'Integer',
87
- :'watermark_options' => :'WatermarkOptions'
112
+ :'watermark_options' => :'WatermarkOptions',
113
+ :'pdf_recognition_mode' => :'String'
88
114
  }
89
115
  end
90
116
 
@@ -134,6 +160,10 @@ module GroupDocsConversionCloud
134
160
  self.watermark_options = attributes[:'WatermarkOptions']
135
161
  end
136
162
 
163
+ if attributes.key?(:'PdfRecognitionMode')
164
+ self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
165
+ end
166
+
137
167
  end
138
168
 
139
169
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -164,6 +194,10 @@ module GroupDocsConversionCloud
164
194
  invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
165
195
  end
166
196
 
197
+ if @pdf_recognition_mode.nil?
198
+ invalid_properties.push("invalid value for 'pdf_recognition_mode', pdf_recognition_mode cannot be nil.")
199
+ end
200
+
167
201
  return invalid_properties
168
202
  end
169
203
 
@@ -176,9 +210,26 @@ module GroupDocsConversionCloud
176
210
  return false if @height.nil?
177
211
  return false if @dpi.nil?
178
212
  return false if @zoom.nil?
213
+ return false if @pdf_recognition_mode.nil?
214
+ pdf_recognition_mode_validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
215
+ return false unless pdf_recognition_mode_validator.valid?(@pdf_recognition_mode)
179
216
  return true
180
217
  end
181
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] pdf_recognition_mode Object to be assigned
221
+ def pdf_recognition_mode=(pdf_recognition_mode)
222
+ validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
223
+ if pdf_recognition_mode.to_i == 0
224
+ unless validator.valid?(pdf_recognition_mode)
225
+ raise ArgumentError, "invalid value for 'pdf_recognition_mode', must be one of #{validator.allowable_values}."
226
+ end
227
+ @pdf_recognition_mode = pdf_recognition_mode
228
+ else
229
+ @pdf_recognition_mode = validator.allowable_values[pdf_recognition_mode.to_i]
230
+ end
231
+ end
232
+
182
233
  # Checks equality by comparing each attribute.
183
234
  # @param [Object] Object to be compared
184
235
  def ==(other)
@@ -192,7 +243,8 @@ module GroupDocsConversionCloud
192
243
  dpi == other.dpi &&
193
244
  password == other.password &&
194
245
  zoom == other.zoom &&
195
- watermark_options == other.watermark_options
246
+ watermark_options == other.watermark_options &&
247
+ pdf_recognition_mode == other.pdf_recognition_mode
196
248
  end
197
249
 
198
250
  # @see the `==` method
@@ -204,7 +256,7 @@ module GroupDocsConversionCloud
204
256
  # Calculates hash code according to all attributes.
205
257
  # @return [Fixnum] Hash code
206
258
  def hash
207
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options].hash
259
+ [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode].hash
208
260
  end
209
261
 
210
262
  # Downcases first letter.
@@ -58,6 +58,30 @@ module GroupDocsConversionCloud
58
58
  # Watermark specific options
59
59
  attr_accessor :watermark_options
60
60
 
61
+ # Recognition mode when converting from pdf
62
+ attr_accessor :pdf_recognition_mode
63
+ class EnumAttributeValidator
64
+ attr_reader :datatype
65
+ attr_reader :allowable_values
66
+
67
+ def initialize(datatype, allowable_values)
68
+ @allowable_values = allowable_values.map do |value|
69
+ case datatype.to_s
70
+ when /Integer/i
71
+ value.to_i
72
+ when /Float/i
73
+ value.to_f
74
+ else
75
+ value
76
+ end
77
+ end
78
+ end
79
+
80
+ def valid?(value)
81
+ !value || allowable_values.include?(value)
82
+ end
83
+ end
84
+
61
85
  # Attribute mapping from ruby-style variable name to JSON key.
62
86
  def self.attribute_map
63
87
  {
@@ -69,7 +93,8 @@ module GroupDocsConversionCloud
69
93
  :'dpi' => :'Dpi',
70
94
  :'password' => :'Password',
71
95
  :'zoom' => :'Zoom',
72
- :'watermark_options' => :'WatermarkOptions'
96
+ :'watermark_options' => :'WatermarkOptions',
97
+ :'pdf_recognition_mode' => :'PdfRecognitionMode'
73
98
  }
74
99
  end
75
100
 
@@ -84,7 +109,8 @@ module GroupDocsConversionCloud
84
109
  :'dpi' => :'Float',
85
110
  :'password' => :'String',
86
111
  :'zoom' => :'Integer',
87
- :'watermark_options' => :'WatermarkOptions'
112
+ :'watermark_options' => :'WatermarkOptions',
113
+ :'pdf_recognition_mode' => :'String'
88
114
  }
89
115
  end
90
116
 
@@ -134,6 +160,10 @@ module GroupDocsConversionCloud
134
160
  self.watermark_options = attributes[:'WatermarkOptions']
135
161
  end
136
162
 
163
+ if attributes.key?(:'PdfRecognitionMode')
164
+ self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
165
+ end
166
+
137
167
  end
138
168
 
139
169
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -164,6 +194,10 @@ module GroupDocsConversionCloud
164
194
  invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
165
195
  end
166
196
 
197
+ if @pdf_recognition_mode.nil?
198
+ invalid_properties.push("invalid value for 'pdf_recognition_mode', pdf_recognition_mode cannot be nil.")
199
+ end
200
+
167
201
  return invalid_properties
168
202
  end
169
203
 
@@ -176,9 +210,26 @@ module GroupDocsConversionCloud
176
210
  return false if @height.nil?
177
211
  return false if @dpi.nil?
178
212
  return false if @zoom.nil?
213
+ return false if @pdf_recognition_mode.nil?
214
+ pdf_recognition_mode_validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
215
+ return false unless pdf_recognition_mode_validator.valid?(@pdf_recognition_mode)
179
216
  return true
180
217
  end
181
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] pdf_recognition_mode Object to be assigned
221
+ def pdf_recognition_mode=(pdf_recognition_mode)
222
+ validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
223
+ if pdf_recognition_mode.to_i == 0
224
+ unless validator.valid?(pdf_recognition_mode)
225
+ raise ArgumentError, "invalid value for 'pdf_recognition_mode', must be one of #{validator.allowable_values}."
226
+ end
227
+ @pdf_recognition_mode = pdf_recognition_mode
228
+ else
229
+ @pdf_recognition_mode = validator.allowable_values[pdf_recognition_mode.to_i]
230
+ end
231
+ end
232
+
182
233
  # Checks equality by comparing each attribute.
183
234
  # @param [Object] Object to be compared
184
235
  def ==(other)
@@ -192,7 +243,8 @@ module GroupDocsConversionCloud
192
243
  dpi == other.dpi &&
193
244
  password == other.password &&
194
245
  zoom == other.zoom &&
195
- watermark_options == other.watermark_options
246
+ watermark_options == other.watermark_options &&
247
+ pdf_recognition_mode == other.pdf_recognition_mode
196
248
  end
197
249
 
198
250
  # @see the `==` method
@@ -204,7 +256,7 @@ module GroupDocsConversionCloud
204
256
  # Calculates hash code according to all attributes.
205
257
  # @return [Fixnum] Hash code
206
258
  def hash
207
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options].hash
259
+ [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode].hash
208
260
  end
209
261
 
210
262
  # Downcases first letter.
@@ -58,6 +58,30 @@ module GroupDocsConversionCloud
58
58
  # Watermark specific options
59
59
  attr_accessor :watermark_options
60
60
 
61
+ # Recognition mode when converting from pdf
62
+ attr_accessor :pdf_recognition_mode
63
+ class EnumAttributeValidator
64
+ attr_reader :datatype
65
+ attr_reader :allowable_values
66
+
67
+ def initialize(datatype, allowable_values)
68
+ @allowable_values = allowable_values.map do |value|
69
+ case datatype.to_s
70
+ when /Integer/i
71
+ value.to_i
72
+ when /Float/i
73
+ value.to_f
74
+ else
75
+ value
76
+ end
77
+ end
78
+ end
79
+
80
+ def valid?(value)
81
+ !value || allowable_values.include?(value)
82
+ end
83
+ end
84
+
61
85
  # Attribute mapping from ruby-style variable name to JSON key.
62
86
  def self.attribute_map
63
87
  {
@@ -69,7 +93,8 @@ module GroupDocsConversionCloud
69
93
  :'dpi' => :'Dpi',
70
94
  :'password' => :'Password',
71
95
  :'zoom' => :'Zoom',
72
- :'watermark_options' => :'WatermarkOptions'
96
+ :'watermark_options' => :'WatermarkOptions',
97
+ :'pdf_recognition_mode' => :'PdfRecognitionMode'
73
98
  }
74
99
  end
75
100
 
@@ -84,7 +109,8 @@ module GroupDocsConversionCloud
84
109
  :'dpi' => :'Float',
85
110
  :'password' => :'String',
86
111
  :'zoom' => :'Integer',
87
- :'watermark_options' => :'WatermarkOptions'
112
+ :'watermark_options' => :'WatermarkOptions',
113
+ :'pdf_recognition_mode' => :'String'
88
114
  }
89
115
  end
90
116
 
@@ -134,6 +160,10 @@ module GroupDocsConversionCloud
134
160
  self.watermark_options = attributes[:'WatermarkOptions']
135
161
  end
136
162
 
163
+ if attributes.key?(:'PdfRecognitionMode')
164
+ self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
165
+ end
166
+
137
167
  end
138
168
 
139
169
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -164,6 +194,10 @@ module GroupDocsConversionCloud
164
194
  invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
165
195
  end
166
196
 
197
+ if @pdf_recognition_mode.nil?
198
+ invalid_properties.push("invalid value for 'pdf_recognition_mode', pdf_recognition_mode cannot be nil.")
199
+ end
200
+
167
201
  return invalid_properties
168
202
  end
169
203
 
@@ -176,9 +210,26 @@ module GroupDocsConversionCloud
176
210
  return false if @height.nil?
177
211
  return false if @dpi.nil?
178
212
  return false if @zoom.nil?
213
+ return false if @pdf_recognition_mode.nil?
214
+ pdf_recognition_mode_validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
215
+ return false unless pdf_recognition_mode_validator.valid?(@pdf_recognition_mode)
179
216
  return true
180
217
  end
181
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] pdf_recognition_mode Object to be assigned
221
+ def pdf_recognition_mode=(pdf_recognition_mode)
222
+ validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
223
+ if pdf_recognition_mode.to_i == 0
224
+ unless validator.valid?(pdf_recognition_mode)
225
+ raise ArgumentError, "invalid value for 'pdf_recognition_mode', must be one of #{validator.allowable_values}."
226
+ end
227
+ @pdf_recognition_mode = pdf_recognition_mode
228
+ else
229
+ @pdf_recognition_mode = validator.allowable_values[pdf_recognition_mode.to_i]
230
+ end
231
+ end
232
+
182
233
  # Checks equality by comparing each attribute.
183
234
  # @param [Object] Object to be compared
184
235
  def ==(other)
@@ -192,7 +243,8 @@ module GroupDocsConversionCloud
192
243
  dpi == other.dpi &&
193
244
  password == other.password &&
194
245
  zoom == other.zoom &&
195
- watermark_options == other.watermark_options
246
+ watermark_options == other.watermark_options &&
247
+ pdf_recognition_mode == other.pdf_recognition_mode
196
248
  end
197
249
 
198
250
  # @see the `==` method
@@ -204,7 +256,7 @@ module GroupDocsConversionCloud
204
256
  # Calculates hash code according to all attributes.
205
257
  # @return [Fixnum] Hash code
206
258
  def hash
207
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options].hash
259
+ [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode].hash
208
260
  end
209
261
 
210
262
  # Downcases first letter.
@@ -58,6 +58,30 @@ module GroupDocsConversionCloud
58
58
  # Watermark specific options
59
59
  attr_accessor :watermark_options
60
60
 
61
+ # Recognition mode when converting from pdf
62
+ attr_accessor :pdf_recognition_mode
63
+ class EnumAttributeValidator
64
+ attr_reader :datatype
65
+ attr_reader :allowable_values
66
+
67
+ def initialize(datatype, allowable_values)
68
+ @allowable_values = allowable_values.map do |value|
69
+ case datatype.to_s
70
+ when /Integer/i
71
+ value.to_i
72
+ when /Float/i
73
+ value.to_f
74
+ else
75
+ value
76
+ end
77
+ end
78
+ end
79
+
80
+ def valid?(value)
81
+ !value || allowable_values.include?(value)
82
+ end
83
+ end
84
+
61
85
  # Attribute mapping from ruby-style variable name to JSON key.
62
86
  def self.attribute_map
63
87
  {
@@ -69,7 +93,8 @@ module GroupDocsConversionCloud
69
93
  :'dpi' => :'Dpi',
70
94
  :'password' => :'Password',
71
95
  :'zoom' => :'Zoom',
72
- :'watermark_options' => :'WatermarkOptions'
96
+ :'watermark_options' => :'WatermarkOptions',
97
+ :'pdf_recognition_mode' => :'PdfRecognitionMode'
73
98
  }
74
99
  end
75
100
 
@@ -84,7 +109,8 @@ module GroupDocsConversionCloud
84
109
  :'dpi' => :'Float',
85
110
  :'password' => :'String',
86
111
  :'zoom' => :'Integer',
87
- :'watermark_options' => :'WatermarkOptions'
112
+ :'watermark_options' => :'WatermarkOptions',
113
+ :'pdf_recognition_mode' => :'String'
88
114
  }
89
115
  end
90
116
 
@@ -134,6 +160,10 @@ module GroupDocsConversionCloud
134
160
  self.watermark_options = attributes[:'WatermarkOptions']
135
161
  end
136
162
 
163
+ if attributes.key?(:'PdfRecognitionMode')
164
+ self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
165
+ end
166
+
137
167
  end
138
168
 
139
169
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -164,6 +194,10 @@ module GroupDocsConversionCloud
164
194
  invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
165
195
  end
166
196
 
197
+ if @pdf_recognition_mode.nil?
198
+ invalid_properties.push("invalid value for 'pdf_recognition_mode', pdf_recognition_mode cannot be nil.")
199
+ end
200
+
167
201
  return invalid_properties
168
202
  end
169
203
 
@@ -176,9 +210,26 @@ module GroupDocsConversionCloud
176
210
  return false if @height.nil?
177
211
  return false if @dpi.nil?
178
212
  return false if @zoom.nil?
213
+ return false if @pdf_recognition_mode.nil?
214
+ pdf_recognition_mode_validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
215
+ return false unless pdf_recognition_mode_validator.valid?(@pdf_recognition_mode)
179
216
  return true
180
217
  end
181
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] pdf_recognition_mode Object to be assigned
221
+ def pdf_recognition_mode=(pdf_recognition_mode)
222
+ validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
223
+ if pdf_recognition_mode.to_i == 0
224
+ unless validator.valid?(pdf_recognition_mode)
225
+ raise ArgumentError, "invalid value for 'pdf_recognition_mode', must be one of #{validator.allowable_values}."
226
+ end
227
+ @pdf_recognition_mode = pdf_recognition_mode
228
+ else
229
+ @pdf_recognition_mode = validator.allowable_values[pdf_recognition_mode.to_i]
230
+ end
231
+ end
232
+
182
233
  # Checks equality by comparing each attribute.
183
234
  # @param [Object] Object to be compared
184
235
  def ==(other)
@@ -192,7 +243,8 @@ module GroupDocsConversionCloud
192
243
  dpi == other.dpi &&
193
244
  password == other.password &&
194
245
  zoom == other.zoom &&
195
- watermark_options == other.watermark_options
246
+ watermark_options == other.watermark_options &&
247
+ pdf_recognition_mode == other.pdf_recognition_mode
196
248
  end
197
249
 
198
250
  # @see the `==` method
@@ -204,7 +256,7 @@ module GroupDocsConversionCloud
204
256
  # Calculates hash code according to all attributes.
205
257
  # @return [Fixnum] Hash code
206
258
  def hash
207
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options].hash
259
+ [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode].hash
208
260
  end
209
261
 
210
262
  # Downcases first letter.
@@ -58,6 +58,30 @@ module GroupDocsConversionCloud
58
58
  # Watermark specific options
59
59
  attr_accessor :watermark_options
60
60
 
61
+ # Recognition mode when converting from pdf
62
+ attr_accessor :pdf_recognition_mode
63
+ class EnumAttributeValidator
64
+ attr_reader :datatype
65
+ attr_reader :allowable_values
66
+
67
+ def initialize(datatype, allowable_values)
68
+ @allowable_values = allowable_values.map do |value|
69
+ case datatype.to_s
70
+ when /Integer/i
71
+ value.to_i
72
+ when /Float/i
73
+ value.to_f
74
+ else
75
+ value
76
+ end
77
+ end
78
+ end
79
+
80
+ def valid?(value)
81
+ !value || allowable_values.include?(value)
82
+ end
83
+ end
84
+
61
85
  # Attribute mapping from ruby-style variable name to JSON key.
62
86
  def self.attribute_map
63
87
  {
@@ -69,7 +93,8 @@ module GroupDocsConversionCloud
69
93
  :'dpi' => :'Dpi',
70
94
  :'password' => :'Password',
71
95
  :'zoom' => :'Zoom',
72
- :'watermark_options' => :'WatermarkOptions'
96
+ :'watermark_options' => :'WatermarkOptions',
97
+ :'pdf_recognition_mode' => :'PdfRecognitionMode'
73
98
  }
74
99
  end
75
100
 
@@ -84,7 +109,8 @@ module GroupDocsConversionCloud
84
109
  :'dpi' => :'Float',
85
110
  :'password' => :'String',
86
111
  :'zoom' => :'Integer',
87
- :'watermark_options' => :'WatermarkOptions'
112
+ :'watermark_options' => :'WatermarkOptions',
113
+ :'pdf_recognition_mode' => :'String'
88
114
  }
89
115
  end
90
116
 
@@ -134,6 +160,10 @@ module GroupDocsConversionCloud
134
160
  self.watermark_options = attributes[:'WatermarkOptions']
135
161
  end
136
162
 
163
+ if attributes.key?(:'PdfRecognitionMode')
164
+ self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
165
+ end
166
+
137
167
  end
138
168
 
139
169
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -164,6 +194,10 @@ module GroupDocsConversionCloud
164
194
  invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
165
195
  end
166
196
 
197
+ if @pdf_recognition_mode.nil?
198
+ invalid_properties.push("invalid value for 'pdf_recognition_mode', pdf_recognition_mode cannot be nil.")
199
+ end
200
+
167
201
  return invalid_properties
168
202
  end
169
203
 
@@ -176,9 +210,26 @@ module GroupDocsConversionCloud
176
210
  return false if @height.nil?
177
211
  return false if @dpi.nil?
178
212
  return false if @zoom.nil?
213
+ return false if @pdf_recognition_mode.nil?
214
+ pdf_recognition_mode_validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
215
+ return false unless pdf_recognition_mode_validator.valid?(@pdf_recognition_mode)
179
216
  return true
180
217
  end
181
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] pdf_recognition_mode Object to be assigned
221
+ def pdf_recognition_mode=(pdf_recognition_mode)
222
+ validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
223
+ if pdf_recognition_mode.to_i == 0
224
+ unless validator.valid?(pdf_recognition_mode)
225
+ raise ArgumentError, "invalid value for 'pdf_recognition_mode', must be one of #{validator.allowable_values}."
226
+ end
227
+ @pdf_recognition_mode = pdf_recognition_mode
228
+ else
229
+ @pdf_recognition_mode = validator.allowable_values[pdf_recognition_mode.to_i]
230
+ end
231
+ end
232
+
182
233
  # Checks equality by comparing each attribute.
183
234
  # @param [Object] Object to be compared
184
235
  def ==(other)
@@ -192,7 +243,8 @@ module GroupDocsConversionCloud
192
243
  dpi == other.dpi &&
193
244
  password == other.password &&
194
245
  zoom == other.zoom &&
195
- watermark_options == other.watermark_options
246
+ watermark_options == other.watermark_options &&
247
+ pdf_recognition_mode == other.pdf_recognition_mode
196
248
  end
197
249
 
198
250
  # @see the `==` method
@@ -204,7 +256,7 @@ module GroupDocsConversionCloud
204
256
  # Calculates hash code according to all attributes.
205
257
  # @return [Fixnum] Hash code
206
258
  def hash
207
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options].hash
259
+ [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode].hash
208
260
  end
209
261
 
210
262
  # Downcases first letter.
@@ -58,6 +58,30 @@ module GroupDocsConversionCloud
58
58
  # Watermark specific options
59
59
  attr_accessor :watermark_options
60
60
 
61
+ # Recognition mode when converting from pdf
62
+ attr_accessor :pdf_recognition_mode
63
+ class EnumAttributeValidator
64
+ attr_reader :datatype
65
+ attr_reader :allowable_values
66
+
67
+ def initialize(datatype, allowable_values)
68
+ @allowable_values = allowable_values.map do |value|
69
+ case datatype.to_s
70
+ when /Integer/i
71
+ value.to_i
72
+ when /Float/i
73
+ value.to_f
74
+ else
75
+ value
76
+ end
77
+ end
78
+ end
79
+
80
+ def valid?(value)
81
+ !value || allowable_values.include?(value)
82
+ end
83
+ end
84
+
61
85
  # Attribute mapping from ruby-style variable name to JSON key.
62
86
  def self.attribute_map
63
87
  {
@@ -69,7 +93,8 @@ module GroupDocsConversionCloud
69
93
  :'dpi' => :'Dpi',
70
94
  :'password' => :'Password',
71
95
  :'zoom' => :'Zoom',
72
- :'watermark_options' => :'WatermarkOptions'
96
+ :'watermark_options' => :'WatermarkOptions',
97
+ :'pdf_recognition_mode' => :'PdfRecognitionMode'
73
98
  }
74
99
  end
75
100
 
@@ -84,7 +109,8 @@ module GroupDocsConversionCloud
84
109
  :'dpi' => :'Float',
85
110
  :'password' => :'String',
86
111
  :'zoom' => :'Integer',
87
- :'watermark_options' => :'WatermarkOptions'
112
+ :'watermark_options' => :'WatermarkOptions',
113
+ :'pdf_recognition_mode' => :'String'
88
114
  }
89
115
  end
90
116
 
@@ -134,6 +160,10 @@ module GroupDocsConversionCloud
134
160
  self.watermark_options = attributes[:'WatermarkOptions']
135
161
  end
136
162
 
163
+ if attributes.key?(:'PdfRecognitionMode')
164
+ self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
165
+ end
166
+
137
167
  end
138
168
 
139
169
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -164,6 +194,10 @@ module GroupDocsConversionCloud
164
194
  invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
165
195
  end
166
196
 
197
+ if @pdf_recognition_mode.nil?
198
+ invalid_properties.push("invalid value for 'pdf_recognition_mode', pdf_recognition_mode cannot be nil.")
199
+ end
200
+
167
201
  return invalid_properties
168
202
  end
169
203
 
@@ -176,9 +210,26 @@ module GroupDocsConversionCloud
176
210
  return false if @height.nil?
177
211
  return false if @dpi.nil?
178
212
  return false if @zoom.nil?
213
+ return false if @pdf_recognition_mode.nil?
214
+ pdf_recognition_mode_validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
215
+ return false unless pdf_recognition_mode_validator.valid?(@pdf_recognition_mode)
179
216
  return true
180
217
  end
181
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] pdf_recognition_mode Object to be assigned
221
+ def pdf_recognition_mode=(pdf_recognition_mode)
222
+ validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
223
+ if pdf_recognition_mode.to_i == 0
224
+ unless validator.valid?(pdf_recognition_mode)
225
+ raise ArgumentError, "invalid value for 'pdf_recognition_mode', must be one of #{validator.allowable_values}."
226
+ end
227
+ @pdf_recognition_mode = pdf_recognition_mode
228
+ else
229
+ @pdf_recognition_mode = validator.allowable_values[pdf_recognition_mode.to_i]
230
+ end
231
+ end
232
+
182
233
  # Checks equality by comparing each attribute.
183
234
  # @param [Object] Object to be compared
184
235
  def ==(other)
@@ -192,7 +243,8 @@ module GroupDocsConversionCloud
192
243
  dpi == other.dpi &&
193
244
  password == other.password &&
194
245
  zoom == other.zoom &&
195
- watermark_options == other.watermark_options
246
+ watermark_options == other.watermark_options &&
247
+ pdf_recognition_mode == other.pdf_recognition_mode
196
248
  end
197
249
 
198
250
  # @see the `==` method
@@ -204,7 +256,7 @@ module GroupDocsConversionCloud
204
256
  # Calculates hash code according to all attributes.
205
257
  # @return [Fixnum] Hash code
206
258
  def hash
207
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options].hash
259
+ [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode].hash
208
260
  end
209
261
 
210
262
  # Downcases first letter.
@@ -58,6 +58,30 @@ module GroupDocsConversionCloud
58
58
  # Watermark specific options
59
59
  attr_accessor :watermark_options
60
60
 
61
+ # Recognition mode when converting from pdf
62
+ attr_accessor :pdf_recognition_mode
63
+ class EnumAttributeValidator
64
+ attr_reader :datatype
65
+ attr_reader :allowable_values
66
+
67
+ def initialize(datatype, allowable_values)
68
+ @allowable_values = allowable_values.map do |value|
69
+ case datatype.to_s
70
+ when /Integer/i
71
+ value.to_i
72
+ when /Float/i
73
+ value.to_f
74
+ else
75
+ value
76
+ end
77
+ end
78
+ end
79
+
80
+ def valid?(value)
81
+ !value || allowable_values.include?(value)
82
+ end
83
+ end
84
+
61
85
  # Attribute mapping from ruby-style variable name to JSON key.
62
86
  def self.attribute_map
63
87
  {
@@ -69,7 +93,8 @@ module GroupDocsConversionCloud
69
93
  :'dpi' => :'Dpi',
70
94
  :'password' => :'Password',
71
95
  :'zoom' => :'Zoom',
72
- :'watermark_options' => :'WatermarkOptions'
96
+ :'watermark_options' => :'WatermarkOptions',
97
+ :'pdf_recognition_mode' => :'PdfRecognitionMode'
73
98
  }
74
99
  end
75
100
 
@@ -84,7 +109,8 @@ module GroupDocsConversionCloud
84
109
  :'dpi' => :'Float',
85
110
  :'password' => :'String',
86
111
  :'zoom' => :'Integer',
87
- :'watermark_options' => :'WatermarkOptions'
112
+ :'watermark_options' => :'WatermarkOptions',
113
+ :'pdf_recognition_mode' => :'String'
88
114
  }
89
115
  end
90
116
 
@@ -134,6 +160,10 @@ module GroupDocsConversionCloud
134
160
  self.watermark_options = attributes[:'WatermarkOptions']
135
161
  end
136
162
 
163
+ if attributes.key?(:'PdfRecognitionMode')
164
+ self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
165
+ end
166
+
137
167
  end
138
168
 
139
169
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -164,6 +194,10 @@ module GroupDocsConversionCloud
164
194
  invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
165
195
  end
166
196
 
197
+ if @pdf_recognition_mode.nil?
198
+ invalid_properties.push("invalid value for 'pdf_recognition_mode', pdf_recognition_mode cannot be nil.")
199
+ end
200
+
167
201
  return invalid_properties
168
202
  end
169
203
 
@@ -176,9 +210,26 @@ module GroupDocsConversionCloud
176
210
  return false if @height.nil?
177
211
  return false if @dpi.nil?
178
212
  return false if @zoom.nil?
213
+ return false if @pdf_recognition_mode.nil?
214
+ pdf_recognition_mode_validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
215
+ return false unless pdf_recognition_mode_validator.valid?(@pdf_recognition_mode)
179
216
  return true
180
217
  end
181
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] pdf_recognition_mode Object to be assigned
221
+ def pdf_recognition_mode=(pdf_recognition_mode)
222
+ validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
223
+ if pdf_recognition_mode.to_i == 0
224
+ unless validator.valid?(pdf_recognition_mode)
225
+ raise ArgumentError, "invalid value for 'pdf_recognition_mode', must be one of #{validator.allowable_values}."
226
+ end
227
+ @pdf_recognition_mode = pdf_recognition_mode
228
+ else
229
+ @pdf_recognition_mode = validator.allowable_values[pdf_recognition_mode.to_i]
230
+ end
231
+ end
232
+
182
233
  # Checks equality by comparing each attribute.
183
234
  # @param [Object] Object to be compared
184
235
  def ==(other)
@@ -192,7 +243,8 @@ module GroupDocsConversionCloud
192
243
  dpi == other.dpi &&
193
244
  password == other.password &&
194
245
  zoom == other.zoom &&
195
- watermark_options == other.watermark_options
246
+ watermark_options == other.watermark_options &&
247
+ pdf_recognition_mode == other.pdf_recognition_mode
196
248
  end
197
249
 
198
250
  # @see the `==` method
@@ -204,7 +256,7 @@ module GroupDocsConversionCloud
204
256
  # Calculates hash code according to all attributes.
205
257
  # @return [Fixnum] Hash code
206
258
  def hash
207
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options].hash
259
+ [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode].hash
208
260
  end
209
261
 
210
262
  # Downcases first letter.
@@ -58,6 +58,30 @@ module GroupDocsConversionCloud
58
58
  # Watermark specific options
59
59
  attr_accessor :watermark_options
60
60
 
61
+ # Recognition mode when converting from pdf
62
+ attr_accessor :pdf_recognition_mode
63
+ class EnumAttributeValidator
64
+ attr_reader :datatype
65
+ attr_reader :allowable_values
66
+
67
+ def initialize(datatype, allowable_values)
68
+ @allowable_values = allowable_values.map do |value|
69
+ case datatype.to_s
70
+ when /Integer/i
71
+ value.to_i
72
+ when /Float/i
73
+ value.to_f
74
+ else
75
+ value
76
+ end
77
+ end
78
+ end
79
+
80
+ def valid?(value)
81
+ !value || allowable_values.include?(value)
82
+ end
83
+ end
84
+
61
85
  # Attribute mapping from ruby-style variable name to JSON key.
62
86
  def self.attribute_map
63
87
  {
@@ -69,7 +93,8 @@ module GroupDocsConversionCloud
69
93
  :'dpi' => :'Dpi',
70
94
  :'password' => :'Password',
71
95
  :'zoom' => :'Zoom',
72
- :'watermark_options' => :'WatermarkOptions'
96
+ :'watermark_options' => :'WatermarkOptions',
97
+ :'pdf_recognition_mode' => :'PdfRecognitionMode'
73
98
  }
74
99
  end
75
100
 
@@ -84,7 +109,8 @@ module GroupDocsConversionCloud
84
109
  :'dpi' => :'Float',
85
110
  :'password' => :'String',
86
111
  :'zoom' => :'Integer',
87
- :'watermark_options' => :'WatermarkOptions'
112
+ :'watermark_options' => :'WatermarkOptions',
113
+ :'pdf_recognition_mode' => :'String'
88
114
  }
89
115
  end
90
116
 
@@ -134,6 +160,10 @@ module GroupDocsConversionCloud
134
160
  self.watermark_options = attributes[:'WatermarkOptions']
135
161
  end
136
162
 
163
+ if attributes.key?(:'PdfRecognitionMode')
164
+ self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
165
+ end
166
+
137
167
  end
138
168
 
139
169
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -164,6 +194,10 @@ module GroupDocsConversionCloud
164
194
  invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
165
195
  end
166
196
 
197
+ if @pdf_recognition_mode.nil?
198
+ invalid_properties.push("invalid value for 'pdf_recognition_mode', pdf_recognition_mode cannot be nil.")
199
+ end
200
+
167
201
  return invalid_properties
168
202
  end
169
203
 
@@ -176,9 +210,26 @@ module GroupDocsConversionCloud
176
210
  return false if @height.nil?
177
211
  return false if @dpi.nil?
178
212
  return false if @zoom.nil?
213
+ return false if @pdf_recognition_mode.nil?
214
+ pdf_recognition_mode_validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
215
+ return false unless pdf_recognition_mode_validator.valid?(@pdf_recognition_mode)
179
216
  return true
180
217
  end
181
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] pdf_recognition_mode Object to be assigned
221
+ def pdf_recognition_mode=(pdf_recognition_mode)
222
+ validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
223
+ if pdf_recognition_mode.to_i == 0
224
+ unless validator.valid?(pdf_recognition_mode)
225
+ raise ArgumentError, "invalid value for 'pdf_recognition_mode', must be one of #{validator.allowable_values}."
226
+ end
227
+ @pdf_recognition_mode = pdf_recognition_mode
228
+ else
229
+ @pdf_recognition_mode = validator.allowable_values[pdf_recognition_mode.to_i]
230
+ end
231
+ end
232
+
182
233
  # Checks equality by comparing each attribute.
183
234
  # @param [Object] Object to be compared
184
235
  def ==(other)
@@ -192,7 +243,8 @@ module GroupDocsConversionCloud
192
243
  dpi == other.dpi &&
193
244
  password == other.password &&
194
245
  zoom == other.zoom &&
195
- watermark_options == other.watermark_options
246
+ watermark_options == other.watermark_options &&
247
+ pdf_recognition_mode == other.pdf_recognition_mode
196
248
  end
197
249
 
198
250
  # @see the `==` method
@@ -204,7 +256,7 @@ module GroupDocsConversionCloud
204
256
  # Calculates hash code according to all attributes.
205
257
  # @return [Fixnum] Hash code
206
258
  def hash
207
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options].hash
259
+ [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode].hash
208
260
  end
209
261
 
210
262
  # Downcases first letter.
@@ -58,8 +58,32 @@ module GroupDocsConversionCloud
58
58
  # Watermark specific options
59
59
  attr_accessor :watermark_options
60
60
 
61
+ # Recognition mode when converting from pdf
62
+ attr_accessor :pdf_recognition_mode
63
+
61
64
  # Specifies whether the keywords for \"old readers\" are written to RTF or not. This can significantly affect the size of the RTF document. Default is False.
62
65
  attr_accessor :export_images_for_old_readers
66
+ class EnumAttributeValidator
67
+ attr_reader :datatype
68
+ attr_reader :allowable_values
69
+
70
+ def initialize(datatype, allowable_values)
71
+ @allowable_values = allowable_values.map do |value|
72
+ case datatype.to_s
73
+ when /Integer/i
74
+ value.to_i
75
+ when /Float/i
76
+ value.to_f
77
+ else
78
+ value
79
+ end
80
+ end
81
+ end
82
+
83
+ def valid?(value)
84
+ !value || allowable_values.include?(value)
85
+ end
86
+ end
63
87
 
64
88
  # Attribute mapping from ruby-style variable name to JSON key.
65
89
  def self.attribute_map
@@ -73,6 +97,7 @@ module GroupDocsConversionCloud
73
97
  :'password' => :'Password',
74
98
  :'zoom' => :'Zoom',
75
99
  :'watermark_options' => :'WatermarkOptions',
100
+ :'pdf_recognition_mode' => :'PdfRecognitionMode',
76
101
  :'export_images_for_old_readers' => :'ExportImagesForOldReaders'
77
102
  }
78
103
  end
@@ -89,6 +114,7 @@ module GroupDocsConversionCloud
89
114
  :'password' => :'String',
90
115
  :'zoom' => :'Integer',
91
116
  :'watermark_options' => :'WatermarkOptions',
117
+ :'pdf_recognition_mode' => :'String',
92
118
  :'export_images_for_old_readers' => :'BOOLEAN'
93
119
  }
94
120
  end
@@ -139,6 +165,10 @@ module GroupDocsConversionCloud
139
165
  self.watermark_options = attributes[:'WatermarkOptions']
140
166
  end
141
167
 
168
+ if attributes.key?(:'PdfRecognitionMode')
169
+ self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
170
+ end
171
+
142
172
  if attributes.key?(:'ExportImagesForOldReaders')
143
173
  self.export_images_for_old_readers = attributes[:'ExportImagesForOldReaders']
144
174
  end
@@ -173,6 +203,10 @@ module GroupDocsConversionCloud
173
203
  invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
174
204
  end
175
205
 
206
+ if @pdf_recognition_mode.nil?
207
+ invalid_properties.push("invalid value for 'pdf_recognition_mode', pdf_recognition_mode cannot be nil.")
208
+ end
209
+
176
210
  if @export_images_for_old_readers.nil?
177
211
  invalid_properties.push("invalid value for 'export_images_for_old_readers', export_images_for_old_readers cannot be nil.")
178
212
  end
@@ -189,10 +223,27 @@ module GroupDocsConversionCloud
189
223
  return false if @height.nil?
190
224
  return false if @dpi.nil?
191
225
  return false if @zoom.nil?
226
+ return false if @pdf_recognition_mode.nil?
227
+ pdf_recognition_mode_validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
228
+ return false unless pdf_recognition_mode_validator.valid?(@pdf_recognition_mode)
192
229
  return false if @export_images_for_old_readers.nil?
193
230
  return true
194
231
  end
195
232
 
233
+ # Custom attribute writer method checking allowed values (enum).
234
+ # @param [Object] pdf_recognition_mode Object to be assigned
235
+ def pdf_recognition_mode=(pdf_recognition_mode)
236
+ validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
237
+ if pdf_recognition_mode.to_i == 0
238
+ unless validator.valid?(pdf_recognition_mode)
239
+ raise ArgumentError, "invalid value for 'pdf_recognition_mode', must be one of #{validator.allowable_values}."
240
+ end
241
+ @pdf_recognition_mode = pdf_recognition_mode
242
+ else
243
+ @pdf_recognition_mode = validator.allowable_values[pdf_recognition_mode.to_i]
244
+ end
245
+ end
246
+
196
247
  # Checks equality by comparing each attribute.
197
248
  # @param [Object] Object to be compared
198
249
  def ==(other)
@@ -207,6 +258,7 @@ module GroupDocsConversionCloud
207
258
  password == other.password &&
208
259
  zoom == other.zoom &&
209
260
  watermark_options == other.watermark_options &&
261
+ pdf_recognition_mode == other.pdf_recognition_mode &&
210
262
  export_images_for_old_readers == other.export_images_for_old_readers
211
263
  end
212
264
 
@@ -219,7 +271,7 @@ module GroupDocsConversionCloud
219
271
  # Calculates hash code according to all attributes.
220
272
  # @return [Fixnum] Hash code
221
273
  def hash
222
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, export_images_for_old_readers].hash
274
+ [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode, export_images_for_old_readers].hash
223
275
  end
224
276
 
225
277
  # Downcases first letter.
@@ -73,6 +73,9 @@ module GroupDocsConversionCloud
73
73
  # Image watermark
74
74
  attr_accessor :image
75
75
 
76
+ # Auto scale the watermark. If the value is true the font size and the position is automatically calculated to fit the page size.
77
+ attr_accessor :auto_align
78
+
76
79
  # Attribute mapping from ruby-style variable name to JSON key.
77
80
  def self.attribute_map
78
81
  {
@@ -89,7 +92,8 @@ module GroupDocsConversionCloud
89
92
  :'rotation_angle' => :'RotationAngle',
90
93
  :'transparency' => :'Transparency',
91
94
  :'background' => :'Background',
92
- :'image' => :'Image'
95
+ :'image' => :'Image',
96
+ :'auto_align' => :'AutoAlign'
93
97
  }
94
98
  end
95
99
 
@@ -109,7 +113,8 @@ module GroupDocsConversionCloud
109
113
  :'rotation_angle' => :'Integer',
110
114
  :'transparency' => :'Float',
111
115
  :'background' => :'BOOLEAN',
112
- :'image' => :'String'
116
+ :'image' => :'String',
117
+ :'auto_align' => :'BOOLEAN'
113
118
  }
114
119
  end
115
120
 
@@ -177,6 +182,10 @@ module GroupDocsConversionCloud
177
182
  self.image = attributes[:'Image']
178
183
  end
179
184
 
185
+ if attributes.key?(:'AutoAlign')
186
+ self.auto_align = attributes[:'AutoAlign']
187
+ end
188
+
180
189
  end
181
190
 
182
191
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -223,6 +232,10 @@ module GroupDocsConversionCloud
223
232
  invalid_properties.push("invalid value for 'background', background cannot be nil.")
224
233
  end
225
234
 
235
+ if @auto_align.nil?
236
+ invalid_properties.push("invalid value for 'auto_align', auto_align cannot be nil.")
237
+ end
238
+
226
239
  return invalid_properties
227
240
  end
228
241
 
@@ -239,6 +252,7 @@ module GroupDocsConversionCloud
239
252
  return false if @rotation_angle.nil?
240
253
  return false if @transparency.nil?
241
254
  return false if @background.nil?
255
+ return false if @auto_align.nil?
242
256
  return true
243
257
  end
244
258
 
@@ -260,7 +274,8 @@ module GroupDocsConversionCloud
260
274
  rotation_angle == other.rotation_angle &&
261
275
  transparency == other.transparency &&
262
276
  background == other.background &&
263
- image == other.image
277
+ image == other.image &&
278
+ auto_align == other.auto_align
264
279
  end
265
280
 
266
281
  # @see the `==` method
@@ -272,7 +287,7 @@ module GroupDocsConversionCloud
272
287
  # Calculates hash code according to all attributes.
273
288
  # @return [Fixnum] Hash code
274
289
  def hash
275
- [text, font_name, font_size, bold, italic, color, width, height, top, left, rotation_angle, transparency, background, image].hash
290
+ [text, font_name, font_size, bold, italic, color, width, height, top, left, rotation_angle, transparency, background, image, auto_align].hash
276
291
  end
277
292
 
278
293
  # Downcases first letter.
@@ -58,6 +58,30 @@ module GroupDocsConversionCloud
58
58
  # Watermark specific options
59
59
  attr_accessor :watermark_options
60
60
 
61
+ # Recognition mode when converting from pdf
62
+ attr_accessor :pdf_recognition_mode
63
+ class EnumAttributeValidator
64
+ attr_reader :datatype
65
+ attr_reader :allowable_values
66
+
67
+ def initialize(datatype, allowable_values)
68
+ @allowable_values = allowable_values.map do |value|
69
+ case datatype.to_s
70
+ when /Integer/i
71
+ value.to_i
72
+ when /Float/i
73
+ value.to_f
74
+ else
75
+ value
76
+ end
77
+ end
78
+ end
79
+
80
+ def valid?(value)
81
+ !value || allowable_values.include?(value)
82
+ end
83
+ end
84
+
61
85
  # Attribute mapping from ruby-style variable name to JSON key.
62
86
  def self.attribute_map
63
87
  {
@@ -69,7 +93,8 @@ module GroupDocsConversionCloud
69
93
  :'dpi' => :'Dpi',
70
94
  :'password' => :'Password',
71
95
  :'zoom' => :'Zoom',
72
- :'watermark_options' => :'WatermarkOptions'
96
+ :'watermark_options' => :'WatermarkOptions',
97
+ :'pdf_recognition_mode' => :'PdfRecognitionMode'
73
98
  }
74
99
  end
75
100
 
@@ -84,7 +109,8 @@ module GroupDocsConversionCloud
84
109
  :'dpi' => :'Float',
85
110
  :'password' => :'String',
86
111
  :'zoom' => :'Integer',
87
- :'watermark_options' => :'WatermarkOptions'
112
+ :'watermark_options' => :'WatermarkOptions',
113
+ :'pdf_recognition_mode' => :'String'
88
114
  }
89
115
  end
90
116
 
@@ -134,6 +160,10 @@ module GroupDocsConversionCloud
134
160
  self.watermark_options = attributes[:'WatermarkOptions']
135
161
  end
136
162
 
163
+ if attributes.key?(:'PdfRecognitionMode')
164
+ self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
165
+ end
166
+
137
167
  end
138
168
 
139
169
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -164,6 +194,10 @@ module GroupDocsConversionCloud
164
194
  invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
165
195
  end
166
196
 
197
+ if @pdf_recognition_mode.nil?
198
+ invalid_properties.push("invalid value for 'pdf_recognition_mode', pdf_recognition_mode cannot be nil.")
199
+ end
200
+
167
201
  return invalid_properties
168
202
  end
169
203
 
@@ -176,9 +210,26 @@ module GroupDocsConversionCloud
176
210
  return false if @height.nil?
177
211
  return false if @dpi.nil?
178
212
  return false if @zoom.nil?
213
+ return false if @pdf_recognition_mode.nil?
214
+ pdf_recognition_mode_validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
215
+ return false unless pdf_recognition_mode_validator.valid?(@pdf_recognition_mode)
179
216
  return true
180
217
  end
181
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] pdf_recognition_mode Object to be assigned
221
+ def pdf_recognition_mode=(pdf_recognition_mode)
222
+ validator = EnumAttributeValidator.new('String', ["Textbox", "Flow"])
223
+ if pdf_recognition_mode.to_i == 0
224
+ unless validator.valid?(pdf_recognition_mode)
225
+ raise ArgumentError, "invalid value for 'pdf_recognition_mode', must be one of #{validator.allowable_values}."
226
+ end
227
+ @pdf_recognition_mode = pdf_recognition_mode
228
+ else
229
+ @pdf_recognition_mode = validator.allowable_values[pdf_recognition_mode.to_i]
230
+ end
231
+ end
232
+
182
233
  # Checks equality by comparing each attribute.
183
234
  # @param [Object] Object to be compared
184
235
  def ==(other)
@@ -192,7 +243,8 @@ module GroupDocsConversionCloud
192
243
  dpi == other.dpi &&
193
244
  password == other.password &&
194
245
  zoom == other.zoom &&
195
- watermark_options == other.watermark_options
246
+ watermark_options == other.watermark_options &&
247
+ pdf_recognition_mode == other.pdf_recognition_mode
196
248
  end
197
249
 
198
250
  # @see the `==` method
@@ -204,7 +256,7 @@ module GroupDocsConversionCloud
204
256
  # Calculates hash code according to all attributes.
205
257
  # @return [Fixnum] Hash code
206
258
  def hash
207
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options].hash
259
+ [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode].hash
208
260
  end
209
261
 
210
262
  # Downcases first letter.
@@ -25,5 +25,5 @@
25
25
  # --------------------------------------------------------------------------------------------------------------------
26
26
  #
27
27
  module GroupDocsConversionCloud
28
- VERSION = "21.9".freeze
28
+ VERSION = "21.10".freeze
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groupdocs_conversion_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: '21.9'
4
+ version: '21.10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - GroupDocs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-15 00:00:00.000000000 Z
11
+ date: 2021-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday