class Comet::Office365CustomSetting
@deprecated This type has been deprecated since Comet version 21.9.xx
If present, it will be automatically converted to the replacement Office365CustomSettingV2 type.
ENGINE_BUILTIN_MSOFFICE).
Office365CustomSetting is used in the EngineProps for an Office 365 Protected Item (see
Office365CustomSetting is a typed class wrapper around the underlying Comet Server API data structure.
def clear
def clear @mailbox_strategy = '' @site_strategy = '' @mailbox_user_ids = [] @mailbox_group_ids = [] @site_ids = [] @unknown_json_fields = {} end
def from_hash(obj)
-
obj
(Hash
) -- The complete object as a Ruby hash
def from_hash(obj) raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash obj.each do |k, v| case k when 'MailboxStrategy' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @mailbox_strategy = v when 'SiteStrategy' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @site_strategy = v when 'MailboxUserIDs' if v.nil? @mailbox_user_ids = [] else @mailbox_user_ids = Array.new(v.length) v.each_with_index do |v1, i1| raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String @mailbox_user_ids[i1] = v1 end end when 'MailboxGroupIDs' if v.nil? @mailbox_group_ids = [] else @mailbox_group_ids = Array.new(v.length) v.each_with_index do |v1, i1| raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String @mailbox_group_ids[i1] = v1 end end when 'SiteIDs' if v.nil? @site_ids = [] else @site_ids = Array.new(v.length) v.each_with_index do |v1, i1| raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String @site_ids[i1] = v1 end end else @unknown_json_fields[k] = v end end end
def from_json(json_string)
-
json_string
(String
) -- The complete object in JSON format
def from_json(json_string) raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String from_hash(JSON.parse(json_string)) end
def initialize
def initialize clear end
def to_h
-
(Hash)
- The complete object as a Ruby hash
def to_h to_hash end
def to_hash
-
(Hash)
- The complete object as a Ruby hash
def to_hash ret = {} ret['MailboxStrategy'] = @mailbox_strategy ret['SiteStrategy'] = @site_strategy ret['MailboxUserIDs'] = @mailbox_user_ids ret['MailboxGroupIDs'] = @mailbox_group_ids ret['SiteIDs'] = @site_ids @unknown_json_fields.each do |k, v| ret[k] = v end ret end
def to_json(options = {})
-
(String)
- The complete object as a JSON string
def to_json(options = {}) to_hash.to_json(options) end