class AsposeSlidesCloud::ReplaceText

Replace text task.

Attributes

ignore_case[RW]

True to ignore case in replace pattern search.

new_text[RW]

Text to replace with.

old_text[RW]

Text to be replaced.

slide_position[RW]

One-based position of the slide to perform the replace in. 0 to make the replace throughout the presentation.

Public Class Methods

attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

Calls superclass method
# File lib/aspose_slides_cloud/models/replace_text.rb, line 41
def self.attribute_map
  super.merge({
    :'old_text' => :'OldText',
    :'new_text' => :'NewText',
    :'ignore_case' => :'IgnoreCase',
    :'slide_position' => :'SlidePosition',
  })
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

Calls superclass method
# File lib/aspose_slides_cloud/models/replace_text.rb, line 62
def initialize(attributes = {})
  super

  if attributes.has_key?(:'OldText')
    self.old_text = attributes[:'OldText']
  end

  if attributes.has_key?(:'NewText')
    self.new_text = attributes[:'NewText']
  end

  if attributes.has_key?(:'IgnoreCase')
    self.ignore_case = attributes[:'IgnoreCase']
  end

  if attributes.has_key?(:'SlidePosition')
    self.slide_position = attributes[:'SlidePosition']
  end
  self.type = 'ReplaceText'
end
swagger_types() click to toggle source

Attribute type mapping.

Calls superclass method
# File lib/aspose_slides_cloud/models/replace_text.rb, line 51
def self.swagger_types
  super.merge({
    :'old_text' => :'String',
    :'new_text' => :'String',
    :'ignore_case' => :'BOOLEAN',
    :'slide_position' => :'Integer',
  })
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/aspose_slides_cloud/models/replace_text.rb, line 109
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      type == o.type &&
      old_text == o.old_text &&
      new_text == o.new_text &&
      ignore_case == o.ignore_case &&
      slide_position == o.slide_position
end
eql?(o) click to toggle source

@see the ‘==` method @param [Object] Object to be compared

# File lib/aspose_slides_cloud/models/replace_text.rb, line 121
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/aspose_slides_cloud/models/replace_text.rb, line 127
def hash
  [type, old_text, new_text, ignore_case, slide_position].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

Calls superclass method
# File lib/aspose_slides_cloud/models/replace_text.rb, line 85
def list_invalid_properties
  invalid_properties = super
  if @ignore_case.nil?
    invalid_properties.push('invalid value for "ignore_case", ignore_case cannot be nil.')
  end

  if @slide_position.nil?
    invalid_properties.push('invalid value for "slide_position", slide_position cannot be nil.')
  end

  invalid_properties
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

Calls superclass method
# File lib/aspose_slides_cloud/models/replace_text.rb, line 100
def valid?
  return false if !super
  return false if @ignore_case.nil?
  return false if @slide_position.nil?
  true
end