class AsposeSlidesCloud::ProtectionProperties

Protection properties.

Attributes

encrypt_document_properties[RW]

True if document properties are encrypted. Has effect only for password protected presentations.

is_encrypted[RW]

Returns true if the presentation protected for reading.

is_write_protected[RW]

Returns true if the presentation protected for editing.

read_password[RW]

Password for read protection.

write_password[RW]

Password for write protection.

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/protection_properties.rb, line 47
def self.attribute_map
  super.merge({
    :'encrypt_document_properties' => :'EncryptDocumentProperties',
    :'read_only_recommended' => :'ReadOnlyRecommended',
    :'read_password' => :'ReadPassword',
    :'write_password' => :'WritePassword',
    :'is_write_protected' => :'IsWriteProtected',
    :'is_encrypted' => :'IsEncrypted',
  })
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/protection_properties.rb, line 72
def initialize(attributes = {})
  super

  if attributes.has_key?(:'EncryptDocumentProperties')
    self.encrypt_document_properties = attributes[:'EncryptDocumentProperties']
  end

  if attributes.has_key?(:'ReadOnlyRecommended')
    self.read_only_recommended = attributes[:'ReadOnlyRecommended']
  end

  if attributes.has_key?(:'ReadPassword')
    self.read_password = attributes[:'ReadPassword']
  end

  if attributes.has_key?(:'WritePassword')
    self.write_password = attributes[:'WritePassword']
  end

  if attributes.has_key?(:'IsWriteProtected')
    self.is_write_protected = attributes[:'IsWriteProtected']
  end

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

Attribute type mapping.

Calls superclass method
# File lib/aspose_slides_cloud/models/protection_properties.rb, line 59
def self.swagger_types
  super.merge({
    :'encrypt_document_properties' => :'BOOLEAN',
    :'read_only_recommended' => :'BOOLEAN',
    :'read_password' => :'String',
    :'write_password' => :'String',
    :'is_write_protected' => :'BOOLEAN',
    :'is_encrypted' => :'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/protection_properties.rb, line 116
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      self_uri == o.self_uri &&
      alternate_links == o.alternate_links &&
      encrypt_document_properties == o.encrypt_document_properties &&
      read_only_recommended == o.read_only_recommended &&
      read_password == o.read_password &&
      write_password == o.write_password &&
      is_write_protected == o.is_write_protected &&
      is_encrypted == o.is_encrypted
end
eql?(o) click to toggle source

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

# File lib/aspose_slides_cloud/models/protection_properties.rb, line 131
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/protection_properties.rb, line 137
def hash
  [self_uri, alternate_links, encrypt_document_properties, read_only_recommended, read_password, write_password, is_write_protected, is_encrypted].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/protection_properties.rb, line 102
def list_invalid_properties
  invalid_properties = super
  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/protection_properties.rb, line 109
def valid?
  return false if !super
  true
end