Class: AsposeSlidesCloud::ProtectionProperties

Inherits:
ResourceBase show all
Defined in:
lib/aspose_slides_cloud/models/protection_properties.rb

Overview

Protection properties.

Instance Attribute Summary collapse

Attributes inherited from ResourceBase

#alternate_links, #self_uri

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ ProtectionProperties

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# 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

Instance Attribute Details

#encrypt_document_propertiesObject

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



29
30
31
# File 'lib/aspose_slides_cloud/models/protection_properties.rb', line 29

def encrypt_document_properties
  @encrypt_document_properties
end

#is_encryptedObject

Returns true if the presentation protected for reading.



44
45
46
# File 'lib/aspose_slides_cloud/models/protection_properties.rb', line 44

def is_encrypted
  @is_encrypted
end

#is_write_protectedObject

Returns true if the presentation protected for editing.



41
42
43
# File 'lib/aspose_slides_cloud/models/protection_properties.rb', line 41

def is_write_protected
  @is_write_protected
end

True if the document should be opened as read-only.



32
33
34
# File 'lib/aspose_slides_cloud/models/protection_properties.rb', line 32

def read_only_recommended
  @read_only_recommended
end

#read_passwordObject

Password for read protection.



35
36
37
# File 'lib/aspose_slides_cloud/models/protection_properties.rb', line 35

def read_password
  @read_password
end

#write_passwordObject

Password for write protection.



38
39
40
# File 'lib/aspose_slides_cloud/models/protection_properties.rb', line 38

def write_password
  @write_password
end

Class Method Details

.attribute_mapObject

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



47
48
49
50
51
52
53
54
55
56
# 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

.swagger_typesObject

Attribute type mapping.



59
60
61
62
63
64
65
66
67
68
# 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

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



116
117
118
119
120
121
122
123
124
125
126
127
# 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) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


131
132
133
# File 'lib/aspose_slides_cloud/models/protection_properties.rb', line 131

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



137
138
139
# 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_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



102
103
104
105
# File 'lib/aspose_slides_cloud/models/protection_properties.rb', line 102

def list_invalid_properties
  invalid_properties = super
  invalid_properties
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



109
110
111
112
# File 'lib/aspose_slides_cloud/models/protection_properties.rb', line 109

def valid?
  return false if !super
  true
end