class AsposeSlidesCloud::AccessPermissions

A set of properties specifying which access permissions should be granted when the document is opened with user access.

Attributes

add_or_modify_fields[RW]

The user may add or modify text annotations, fill in interactive form fields, and, if bit ModifyContent is also set, create or modify interactive form fields (including signature fields).

assemble_document[RW]

The user may assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if bit ModifyContent is clear.

copy_text_and_graphics[RW]

The user may copy or otherwise extract text and graphics from the document by operations other than that controlled by bit ExtractTextAndGraphics.

extract_text_and_graphics[RW]

The user may extract text and graphics in support of accessibility to users with disabilities or for other purposes.

fill_existing_fields[RW]

The user may fill in existing interactive form fields (including signature fields), even if bit AddOrModifyFields is clear.

high_quality_print[RW]

The user may print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this bit is clear (and bit PrintDocument is set), printing is limited to a low-level representation of the appearance, possibly of degraded quality.

modify_content[RW]

The user may modify the contents of the document by operations other than those controlled by bits AddOrModifyFields, FillExistingFields, AssembleDocument.

print_document[RW]

The user may print the document (possibly not at the highest quality level, depending on whether bit HighQualityPrint is also set).

Public Class Methods

attribute_map() click to toggle source

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

# File lib/aspose_slides_cloud/models/access_permissions.rb, line 53
def self.attribute_map
  {
    :'print_document' => :'PrintDocument',
    :'modify_content' => :'ModifyContent',
    :'copy_text_and_graphics' => :'CopyTextAndGraphics',
    :'add_or_modify_fields' => :'AddOrModifyFields',
    :'fill_existing_fields' => :'FillExistingFields',
    :'extract_text_and_graphics' => :'ExtractTextAndGraphics',
    :'assemble_document' => :'AssembleDocument',
    :'high_quality_print' => :'HighQualityPrint',
  }
end
new(attributes = {}) click to toggle source

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

# File lib/aspose_slides_cloud/models/access_permissions.rb, line 82
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.has_key?(:'PrintDocument')
    self.print_document = attributes[:'PrintDocument']
  end

  if attributes.has_key?(:'ModifyContent')
    self.modify_content = attributes[:'ModifyContent']
  end

  if attributes.has_key?(:'CopyTextAndGraphics')
    self.copy_text_and_graphics = attributes[:'CopyTextAndGraphics']
  end

  if attributes.has_key?(:'AddOrModifyFields')
    self.add_or_modify_fields = attributes[:'AddOrModifyFields']
  end

  if attributes.has_key?(:'FillExistingFields')
    self.fill_existing_fields = attributes[:'FillExistingFields']
  end

  if attributes.has_key?(:'ExtractTextAndGraphics')
    self.extract_text_and_graphics = attributes[:'ExtractTextAndGraphics']
  end

  if attributes.has_key?(:'AssembleDocument')
    self.assemble_document = attributes[:'AssembleDocument']
  end

  if attributes.has_key?(:'HighQualityPrint')
    self.high_quality_print = attributes[:'HighQualityPrint']
  end
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/aspose_slides_cloud/models/access_permissions.rb, line 67
def self.swagger_types
  {
    :'print_document' => :'BOOLEAN',
    :'modify_content' => :'BOOLEAN',
    :'copy_text_and_graphics' => :'BOOLEAN',
    :'add_or_modify_fields' => :'BOOLEAN',
    :'fill_existing_fields' => :'BOOLEAN',
    :'extract_text_and_graphics' => :'BOOLEAN',
    :'assemble_document' => :'BOOLEAN',
    :'high_quality_print' => :'BOOLEAN',
  }
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/access_permissions.rb, line 176
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      print_document == o.print_document &&
      modify_content == o.modify_content &&
      copy_text_and_graphics == o.copy_text_and_graphics &&
      add_or_modify_fields == o.add_or_modify_fields &&
      fill_existing_fields == o.fill_existing_fields &&
      extract_text_and_graphics == o.extract_text_and_graphics &&
      assemble_document == o.assemble_document &&
      high_quality_print == o.high_quality_print
end
eql?(o) click to toggle source

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

# File lib/aspose_slides_cloud/models/access_permissions.rb, line 191
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/access_permissions.rb, line 197
def hash
  [print_document, modify_content, copy_text_and_graphics, add_or_modify_fields, fill_existing_fields, extract_text_and_graphics, assemble_document, high_quality_print].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

# File lib/aspose_slides_cloud/models/access_permissions.rb, line 123
def list_invalid_properties
  invalid_properties = Array.new
  if @print_document.nil?
    invalid_properties.push('invalid value for "print_document", print_document cannot be nil.')
  end

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

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

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

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

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

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

  if @high_quality_print.nil?
    invalid_properties.push('invalid value for "high_quality_print", high_quality_print 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

# File lib/aspose_slides_cloud/models/access_permissions.rb, line 162
def valid?
  return false if @print_document.nil?
  return false if @modify_content.nil?
  return false if @copy_text_and_graphics.nil?
  return false if @add_or_modify_fields.nil?
  return false if @fill_existing_fields.nil?
  return false if @extract_text_and_graphics.nil?
  return false if @assemble_document.nil?
  return false if @high_quality_print.nil?
  true
end