Class: GroupDocsComparisonCloud::Settings
- Inherits:
-
Object
- Object
- GroupDocsComparisonCloud::Settings
- Defined in:
- lib/groupdocs_comparison_cloud/models/settings.rb
Overview
Defines comparison process additional settings
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#calculate_component_coordinates ⇒ Object
Indicates whether to calculate coordinates for changed components.
-
#changed_items_style ⇒ Object
Style for components with changed style.
-
#clone_metadata ⇒ Object
Gets or sets type of metadata to clone.
-
#deleted_items_style ⇒ Object
Style for deleted components.
-
#details_level ⇒ Object
Gets of sets the comparison details level.
-
#diagram_master_setting ⇒ Object
Gets or sets master for Diagram document.
-
#generate_summary_page ⇒ Object
Indicates whether to add summary page to resultant document or not.
-
#header_footers_comparison ⇒ Object
Control to turn on comparison of header/footer contents.
-
#inserted_items_style ⇒ Object
Style for inserted components.
-
#mark_changed_content ⇒ Object
Indicates whether to use frames for shapes in Word Processing and for rectangles in Image documents.
-
#mark_nested_content ⇒ Object
Gets or sets a value indicating whether to mark the children of the deleted or inserted element as deleted or inserted.
-
#meta_data ⇒ Object
Gets or sets user metadata.
-
#original_size ⇒ Object
Gets or sets original document size when picture is compared with other different formats.
-
#paper_size ⇒ Object
Gets or sets the result document paper size.
-
#password ⇒ Object
Gets or sets user password to resultant document.
-
#password_save_option ⇒ Object
Gets or sets type of password saving.
-
#sensitivity_of_comparison ⇒ Object
Gets or sets a sensitivity of comparison.
-
#show_deleted_content ⇒ Object
Indicates whether to show deleted components in resultant document or not.
-
#show_inserted_content ⇒ Object
Indicates whether to show inserted components in resultant document or not.
-
#style_change_detection ⇒ Object
Indicates whether to detect style changes or not.
-
#use_frames_for_del_ins_elements ⇒ Object
Indicates whether to use frames for shapes in Word Processing and for rectangles in Image documents.
-
#words_separator_chars ⇒ Object
An array of delimiters to split text into words.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Settings
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#uncap(str) ⇒ Object
Downcases first letter.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Settings
Initializes the object
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 179 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.key?(:'GenerateSummaryPage') self.generate_summary_page = attributes[:'GenerateSummaryPage'] end if attributes.key?(:'ShowDeletedContent') self.show_deleted_content = attributes[:'ShowDeletedContent'] end if attributes.key?(:'ShowInsertedContent') self.show_inserted_content = attributes[:'ShowInsertedContent'] end if attributes.key?(:'StyleChangeDetection') self.style_change_detection = attributes[:'StyleChangeDetection'] end if attributes.key?(:'InsertedItemsStyle') self.inserted_items_style = attributes[:'InsertedItemsStyle'] end if attributes.key?(:'DeletedItemsStyle') self.deleted_items_style = attributes[:'DeletedItemsStyle'] end if attributes.key?(:'ChangedItemsStyle') self.changed_items_style = attributes[:'ChangedItemsStyle'] end if attributes.key?(:'WordsSeparatorChars') if (value = attributes[:'WordsSeparatorChars']).is_a?(Array) self.words_separator_chars = value end end if attributes.key?(:'DetailsLevel') self.details_level = attributes[:'DetailsLevel'] end if attributes.key?(:'UseFramesForDelInsElements') self.use_frames_for_del_ins_elements = attributes[:'UseFramesForDelInsElements'] end if attributes.key?(:'CalculateComponentCoordinates') self.calculate_component_coordinates = attributes[:'CalculateComponentCoordinates'] end if attributes.key?(:'MarkChangedContent') self.mark_changed_content = attributes[:'MarkChangedContent'] end if attributes.key?(:'MarkNestedContent') self.mark_nested_content = attributes[:'MarkNestedContent'] end if attributes.key?(:'CloneMetadata') self. = attributes[:'CloneMetadata'] end if attributes.key?(:'MetaData') self. = attributes[:'MetaData'] end if attributes.key?(:'PasswordSaveOption') self.password_save_option = attributes[:'PasswordSaveOption'] end if attributes.key?(:'Password') self.password = attributes[:'Password'] end if attributes.key?(:'DiagramMasterSetting') self.diagram_master_setting = attributes[:'DiagramMasterSetting'] end if attributes.key?(:'OriginalSize') self.original_size = attributes[:'OriginalSize'] end if attributes.key?(:'HeaderFootersComparison') self. = attributes[:'HeaderFootersComparison'] end if attributes.key?(:'PaperSize') self.paper_size = attributes[:'PaperSize'] end if attributes.key?(:'SensitivityOfComparison') self.sensitivity_of_comparison = attributes[:'SensitivityOfComparison'] end end |
Instance Attribute Details
#calculate_component_coordinates ⇒ Object
Indicates whether to calculate coordinates for changed components
65 66 67 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 65 def calculate_component_coordinates @calculate_component_coordinates end |
#changed_items_style ⇒ Object
Style for components with changed style
53 54 55 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 53 def changed_items_style @changed_items_style end |
#clone_metadata ⇒ Object
Gets or sets type of metadata to clone
74 75 76 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 74 def @clone_metadata end |
#deleted_items_style ⇒ Object
Style for deleted components
50 51 52 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 50 def deleted_items_style @deleted_items_style end |
#details_level ⇒ Object
Gets of sets the comparison details level
59 60 61 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 59 def details_level @details_level end |
#diagram_master_setting ⇒ Object
Gets or sets master for Diagram document
86 87 88 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 86 def diagram_master_setting @diagram_master_setting end |
#generate_summary_page ⇒ Object
Indicates whether to add summary page to resultant document or not
35 36 37 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 35 def generate_summary_page @generate_summary_page end |
#header_footers_comparison ⇒ Object
Control to turn on comparison of header/footer contents
92 93 94 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 92 def @header_footers_comparison end |
#inserted_items_style ⇒ Object
Style for inserted components
47 48 49 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 47 def inserted_items_style @inserted_items_style end |
#mark_changed_content ⇒ Object
Indicates whether to use frames for shapes in Word Processing and for rectangles in Image documents
68 69 70 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 68 def mark_changed_content @mark_changed_content end |
#mark_nested_content ⇒ Object
Gets or sets a value indicating whether to mark the children of the deleted or inserted element as deleted or inserted
71 72 73 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 71 def mark_nested_content @mark_nested_content end |
#meta_data ⇒ Object
Gets or sets user metadata
77 78 79 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 77 def @meta_data end |
#original_size ⇒ Object
Gets or sets original document size when picture is compared with other different formats
89 90 91 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 89 def original_size @original_size end |
#paper_size ⇒ Object
Gets or sets the result document paper size
95 96 97 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 95 def paper_size @paper_size end |
#password ⇒ Object
Gets or sets user password to resultant document
83 84 85 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 83 def password @password end |
#password_save_option ⇒ Object
Gets or sets type of password saving
80 81 82 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 80 def password_save_option @password_save_option end |
#sensitivity_of_comparison ⇒ Object
Gets or sets a sensitivity of comparison. Default is 75
98 99 100 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 98 def sensitivity_of_comparison @sensitivity_of_comparison end |
#show_deleted_content ⇒ Object
Indicates whether to show deleted components in resultant document or not
38 39 40 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 38 def show_deleted_content @show_deleted_content end |
#show_inserted_content ⇒ Object
Indicates whether to show inserted components in resultant document or not
41 42 43 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 41 def show_inserted_content @show_inserted_content end |
#style_change_detection ⇒ Object
Indicates whether to detect style changes or not
44 45 46 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 44 def style_change_detection @style_change_detection end |
#use_frames_for_del_ins_elements ⇒ Object
Indicates whether to use frames for shapes in Word Processing and for rectangles in Image documents
62 63 64 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 62 def use_frames_for_del_ins_elements @use_frames_for_del_ins_elements end |
#words_separator_chars ⇒ Object
An array of delimiters to split text into words
56 57 58 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 56 def words_separator_chars @words_separator_chars end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 122 def self.attribute_map { :'generate_summary_page' => :'GenerateSummaryPage', :'show_deleted_content' => :'ShowDeletedContent', :'show_inserted_content' => :'ShowInsertedContent', :'style_change_detection' => :'StyleChangeDetection', :'inserted_items_style' => :'InsertedItemsStyle', :'deleted_items_style' => :'DeletedItemsStyle', :'changed_items_style' => :'ChangedItemsStyle', :'words_separator_chars' => :'WordsSeparatorChars', :'details_level' => :'DetailsLevel', :'use_frames_for_del_ins_elements' => :'UseFramesForDelInsElements', :'calculate_component_coordinates' => :'CalculateComponentCoordinates', :'mark_changed_content' => :'MarkChangedContent', :'mark_nested_content' => :'MarkNestedContent', :'clone_metadata' => :'CloneMetadata', :'meta_data' => :'MetaData', :'password_save_option' => :'PasswordSaveOption', :'password' => :'Password', :'diagram_master_setting' => :'DiagramMasterSetting', :'original_size' => :'OriginalSize', :'header_footers_comparison' => :'HeaderFootersComparison', :'paper_size' => :'PaperSize', :'sensitivity_of_comparison' => :'SensitivityOfComparison' } end |
.swagger_types ⇒ Object
Attribute type mapping.
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 150 def self.swagger_types { :'generate_summary_page' => :'BOOLEAN', :'show_deleted_content' => :'BOOLEAN', :'show_inserted_content' => :'BOOLEAN', :'style_change_detection' => :'BOOLEAN', :'inserted_items_style' => :'ItemsStyle', :'deleted_items_style' => :'ItemsStyle', :'changed_items_style' => :'ItemsStyle', :'words_separator_chars' => :'Array<String>', :'details_level' => :'String', :'use_frames_for_del_ins_elements' => :'BOOLEAN', :'calculate_component_coordinates' => :'BOOLEAN', :'mark_changed_content' => :'BOOLEAN', :'mark_nested_content' => :'BOOLEAN', :'clone_metadata' => :'String', :'meta_data' => :'Metadata', :'password_save_option' => :'String', :'password' => :'String', :'diagram_master_setting' => :'DiagramMasterSetting', :'original_size' => :'Size', :'header_footers_comparison' => :'BOOLEAN', :'paper_size' => :'String', :'sensitivity_of_comparison' => :'Integer' } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 430 def ==(other) return true if self.equal?(other) self.class == other.class && generate_summary_page == other.generate_summary_page && show_deleted_content == other.show_deleted_content && show_inserted_content == other.show_inserted_content && style_change_detection == other.style_change_detection && inserted_items_style == other.inserted_items_style && deleted_items_style == other.deleted_items_style && changed_items_style == other.changed_items_style && words_separator_chars == other.words_separator_chars && details_level == other.details_level && use_frames_for_del_ins_elements == other.use_frames_for_del_ins_elements && calculate_component_coordinates == other.calculate_component_coordinates && mark_changed_content == other.mark_changed_content && mark_nested_content == other.mark_nested_content && == other. && == other. && password_save_option == other.password_save_option && password == other.password && diagram_master_setting == other.diagram_master_setting && original_size == other.original_size && == other. && paper_size == other.paper_size && sensitivity_of_comparison == other.sensitivity_of_comparison end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 502 def _deserialize(type, value) case type.to_sym when :DateTime Date.parse value when :Date Date.parse value when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = GroupDocsComparisonCloud.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
569 570 571 572 573 574 575 576 577 578 579 580 581 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 569 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 478 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| pname = uncap(self.class.attribute_map[key]).intern value = attributes[pname] if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if value.is_a?(Array) self.send("#{key}=", value.map { |v| _deserialize($1, v) }) end elsif !value.nil? self.send("#{key}=", _deserialize(type, value)) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
459 460 461 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 459 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
465 466 467 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 465 def hash [generate_summary_page, show_deleted_content, show_inserted_content, style_change_detection, inserted_items_style, deleted_items_style, changed_items_style, words_separator_chars, details_level, use_frames_for_del_ins_elements, calculate_component_coordinates, mark_changed_content, mark_nested_content, , , password_save_option, password, diagram_master_setting, original_size, , paper_size, sensitivity_of_comparison].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 279 def list_invalid_properties invalid_properties = [] if @generate_summary_page.nil? invalid_properties.push("invalid value for 'generate_summary_page', generate_summary_page cannot be nil.") end if @show_deleted_content.nil? invalid_properties.push("invalid value for 'show_deleted_content', show_deleted_content cannot be nil.") end if @show_inserted_content.nil? invalid_properties.push("invalid value for 'show_inserted_content', show_inserted_content cannot be nil.") end if @style_change_detection.nil? invalid_properties.push("invalid value for 'style_change_detection', style_change_detection cannot be nil.") end if @details_level.nil? invalid_properties.push("invalid value for 'details_level', details_level cannot be nil.") end if @use_frames_for_del_ins_elements.nil? invalid_properties.push("invalid value for 'use_frames_for_del_ins_elements', use_frames_for_del_ins_elements cannot be nil.") end if @calculate_component_coordinates.nil? invalid_properties.push("invalid value for 'calculate_component_coordinates', calculate_component_coordinates cannot be nil.") end if @mark_changed_content.nil? invalid_properties.push("invalid value for 'mark_changed_content', mark_changed_content cannot be nil.") end if @mark_nested_content.nil? invalid_properties.push("invalid value for 'mark_nested_content', mark_nested_content cannot be nil.") end if @clone_metadata.nil? invalid_properties.push("invalid value for 'clone_metadata', clone_metadata cannot be nil.") end if @password_save_option.nil? invalid_properties.push("invalid value for 'password_save_option', password_save_option cannot be nil.") end if @header_footers_comparison.nil? invalid_properties.push("invalid value for 'header_footers_comparison', header_footers_comparison cannot be nil.") end if @paper_size.nil? invalid_properties.push("invalid value for 'paper_size', paper_size cannot be nil.") end if @sensitivity_of_comparison.nil? invalid_properties.push("invalid value for 'sensitivity_of_comparison', sensitivity_of_comparison cannot be nil.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
549 550 551 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 549 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
555 556 557 558 559 560 561 562 563 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 555 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
543 544 545 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 543 def to_s to_hash.to_s end |
#uncap(str) ⇒ Object
Downcases first letter.
471 472 473 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 471 def uncap(str) str[0, 1].downcase + str[1..-1] end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/groupdocs_comparison_cloud/models/settings.rb', line 342 def valid? return false if @generate_summary_page.nil? return false if @show_deleted_content.nil? return false if @show_inserted_content.nil? return false if @style_change_detection.nil? return false if @details_level.nil? details_level_validator = EnumAttributeValidator.new('String', ["Low", "Middle", "High"]) return false unless details_level_validator.valid?(@details_level) return false if @use_frames_for_del_ins_elements.nil? return false if @calculate_component_coordinates.nil? return false if @mark_changed_content.nil? return false if @mark_nested_content.nil? return false if @clone_metadata.nil? = EnumAttributeValidator.new('String', ["Default", "Source", "Target", "FileAuthor"]) return false unless .valid?(@clone_metadata) return false if @password_save_option.nil? password_save_option_validator = EnumAttributeValidator.new('String', ["None", "Source", "Target", "User"]) return false unless password_save_option_validator.valid?(@password_save_option) return false if @header_footers_comparison.nil? return false if @paper_size.nil? paper_size_validator = EnumAttributeValidator.new('String', ["Default", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8"]) return false unless paper_size_validator.valid?(@paper_size) return false if @sensitivity_of_comparison.nil? return true end |