Class: Zm::Client::DataSource

Inherits:
Base::Object show all
Defined in:
lib/zm/client/datasource/datasource.rb

Overview

class account data source

Constant Summary collapse

TYPES =
%i[cal caldav yab gal imap pop3 rss unknown]

Instance Attribute Summary collapse

Attributes inherited from Base::Object

#parent, #token

Instance Method Summary collapse

Methods inherited from Base::Object

#clone, #inspect, #instance_variables_map, #logger, #recorded?, #save!, #to_h, #to_s, #update_attribute

Constructor Details

#initialize(parent, data_source_type) ⇒ DataSource

Returns a new instance of DataSource.



22
23
24
25
# File 'lib/zm/client/datasource/datasource.rb', line 22

def initialize(parent, data_source_type)
  @type = data_source_type
  super(parent)
end

Instance Attribute Details

#aObject

Returns the value of attribute a.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def a
  @a
end

#cconnectionTypeObject

Returns the value of attribute cconnectionType.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cconnectionType
  @cconnectionType
end

#cdefaultSignatureObject

Returns the value of attribute cdefaultSignature.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cdefaultSignature
  @cdefaultSignature
end

#cemailAddressObject

Returns the value of attribute cemailAddress.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cemailAddress
  @cemailAddress
end

#cfailingSinceObject

Returns the value of attribute cfailingSince.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cfailingSince
  @cfailingSince
end

#cforwardReplySignatureObject

Returns the value of attribute cforwardReplySignature.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cforwardReplySignature
  @cforwardReplySignature
end

#cfromDisplayObject

Returns the value of attribute cfromDisplay.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cfromDisplay
  @cfromDisplay
end

#chostObject

Returns the value of attribute chost.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def chost
  @chost
end

#cidObject

Returns the value of attribute cid.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cid
  @cid
end

#cimportClassObject

Returns the value of attribute cimportClass.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cimportClass
  @cimportClass
end

#cimportOnlyObject

Returns the value of attribute cimportOnly.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cimportOnly
  @cimportOnly
end

#cisEnabledObject

Returns the value of attribute cisEnabled.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cisEnabled
  @cisEnabled
end

#clObject

Returns the value of attribute cl.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cl
  @cl
end

#clientIdObject

Returns the value of attribute clientId.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def clientId
  @clientId
end

#clientSecretObject

Returns the value of attribute clientSecret.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def clientSecret
  @clientSecret
end

#cnameObject

Returns the value of attribute cname.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cname
  @cname
end

#connectionTypeObject

Returns the value of attribute connectionType.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def connectionType
  @connectionType
end

#cpasswordObject

Returns the value of attribute cpassword.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cpassword
  @cpassword
end

#cpollingIntervalObject

Returns the value of attribute cpollingInterval.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cpollingInterval
  @cpollingInterval
end

#cportObject

Returns the value of attribute cport.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cport
  @cport
end

#crefreshTokenObject

Returns the value of attribute crefreshToken.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def crefreshToken
  @crefreshToken
end

#crefreshTokenUrlObject

Returns the value of attribute crefreshTokenUrl.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def crefreshTokenUrl
  @crefreshTokenUrl
end

#creplyToAddressObject

Returns the value of attribute creplyToAddress.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def creplyToAddress
  @creplyToAddress
end

#creplyToDisplayObject

Returns the value of attribute creplyToDisplay.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def creplyToDisplay
  @creplyToDisplay
end

#csmtpAuthRequiredObject

Returns the value of attribute csmtpAuthRequired.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def csmtpAuthRequired
  @csmtpAuthRequired
end

#csmtpConnectionTypeObject

Returns the value of attribute csmtpConnectionType.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def csmtpConnectionType
  @csmtpConnectionType
end

#csmtpEnabledObject

Returns the value of attribute csmtpEnabled.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def csmtpEnabled
  @csmtpEnabled
end

#csmtpHostObject

Returns the value of attribute csmtpHost.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def csmtpHost
  @csmtpHost
end

#csmtpPasswordObject

Returns the value of attribute csmtpPassword.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def csmtpPassword
  @csmtpPassword
end

#csmtpPortObject

Returns the value of attribute csmtpPort.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def csmtpPort
  @csmtpPort
end

#csmtpUsernameObject

Returns the value of attribute csmtpUsername.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def csmtpUsername
  @csmtpUsername
end

#cuseAddressForForwardReplyObject

Returns the value of attribute cuseAddressForForwardReply.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cuseAddressForForwardReply
  @cuseAddressForForwardReply
end

#cusernameObject

Returns the value of attribute cusername.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def cusername
  @cusername
end

#defaultSignatureObject

Returns the value of attribute defaultSignature.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def defaultSignature
  @defaultSignature
end

#emailAddressObject

Returns the value of attribute emailAddress.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def emailAddress
  @emailAddress
end

#failingSinceObject

Returns the value of attribute failingSince.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def failingSince
  @failingSince
end

#forwardReplySignatureObject

Returns the value of attribute forwardReplySignature.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def forwardReplySignature
  @forwardReplySignature
end

#fromDisplayObject

Returns the value of attribute fromDisplay.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def fromDisplay
  @fromDisplay
end

#hostObject

Returns the value of attribute host.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def host
  @host
end

#idObject

Returns the value of attribute id.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def id
  @id
end

#importClassObject

Returns the value of attribute importClass.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def importClass
  @importClass
end

#importOnlyObject

Returns the value of attribute importOnly.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def importOnly
  @importOnly
end

#isEnabledObject

Returns the value of attribute isEnabled.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def isEnabled
  @isEnabled
end

#lObject

Returns the value of attribute l.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def l
  @l
end

#lastErrorObject

Returns the value of attribute lastError.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def lastError
  @lastError
end

#leaveOnServerObject

Returns the value of attribute leaveOnServer.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def leaveOnServer
  @leaveOnServer
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def name
  @name
end

#oauthTokenObject

Returns the value of attribute oauthToken.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def oauthToken
  @oauthToken
end

#passwordObject

Returns the value of attribute password.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def password
  @password
end

#pollingIntervalObject

Returns the value of attribute pollingInterval.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def pollingInterval
  @pollingInterval
end

#portObject

Returns the value of attribute port.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def port
  @port
end

#refreshTokenObject

Returns the value of attribute refreshToken.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def refreshToken
  @refreshToken
end

#refreshTokenUrlObject

Returns the value of attribute refreshTokenUrl.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def refreshTokenUrl
  @refreshTokenUrl
end

#replyToAddressObject

Returns the value of attribute replyToAddress.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def replyToAddress
  @replyToAddress
end

#replyToDisplayObject

Returns the value of attribute replyToDisplay.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def replyToDisplay
  @replyToDisplay
end

#smtpAuthRequiredObject

Returns the value of attribute smtpAuthRequired.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def smtpAuthRequired
  @smtpAuthRequired
end

#smtpConnectionTypeObject

Returns the value of attribute smtpConnectionType.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def smtpConnectionType
  @smtpConnectionType
end

#smtpEnabledObject

Returns the value of attribute smtpEnabled.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def smtpEnabled
  @smtpEnabled
end

#smtpHostObject

Returns the value of attribute smtpHost.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def smtpHost
  @smtpHost
end

#smtpPasswordObject

Returns the value of attribute smtpPassword.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def smtpPassword
  @smtpPassword
end

#smtpPortObject

Returns the value of attribute smtpPort.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def smtpPort
  @smtpPort
end

#smtpUsernameObject

Returns the value of attribute smtpUsername.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def smtpUsername
  @smtpUsername
end

#testObject

Returns the value of attribute test.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def test
  @test
end

#typeObject

Returns the value of attribute type.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def type
  @type
end

#useAddressForForwardReplyObject

Returns the value of attribute useAddressForForwardReply.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def useAddressForForwardReply
  @useAddressForForwardReply
end

#usernameObject

Returns the value of attribute username.



9
10
11
# File 'lib/zm/client/datasource/datasource.rb', line 9

def username
  @username
end

Instance Method Details

#create!Object

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/zm/client/datasource/datasource.rb', line 27

def create!
  raise NotImplementedError
end

#delete!Object



51
52
53
54
55
56
# File 'lib/zm/client/datasource/datasource.rb', line 51

def delete!
  return false if @id.nil?

  @parent.sacc.invoke(jsns_builder.to_delete)
  @id = nil
end

#modify!Object

Raises:

  • (NotImplementedError)


31
32
33
# File 'lib/zm/client/datasource/datasource.rb', line 31

def modify!
  raise NotImplementedError
end

#rename!(new_name) ⇒ Object

Raises:

  • (NotImplementedError)


47
48
49
# File 'lib/zm/client/datasource/datasource.rb', line 47

def rename!(new_name)
  raise NotImplementedError
end

#update!(hash) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/zm/client/datasource/datasource.rb', line 35

def update!(hash)
  return false if hash.delete_if { |k, v| v.nil? || !respond_to?(k) }.empty?

  do_update!(hash)

  hash.each do |key, value|
    update_attribute(key, value)
  end

  true
end