class Comet::AuthenticationRoleOptions
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 'RoleEnabled' @role_enabled = v when 'DatabaseCheckLevel' raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric @database_check_level = v when 'GenerateMissedBackupEvents' @generate_missed_backup_events = v when 'NoMissedBackupEventsBefore' raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric @no_missed_backup_events_before = v when 'GenerateScheduledEmails' @generate_scheduled_emails = v when 'PruneLogsAfterDays' raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric @prune_logs_after_days = v when 'RemoteStorage' if v.nil? @remote_storage = [] else @remote_storage = Array.new(v.length) v.each_with_index do |v1, i1| @remote_storage[i1] = Comet::RemoteStorageOption.new @remote_storage[i1].from_hash(v1) end end when 'ReplicateTo' if v.nil? @replicate_to = [] else @replicate_to = Array.new(v.length) v.each_with_index do |v1, i1| @replicate_to[i1] = Comet::ReplicaServer.new @replicate_to[i1].from_hash(v1) end end when 'GlobalOverrides' @global_overrides = Comet::GlobalOverrideOptions.new @global_overrides.from_hash(v) else @unknown_json_fields[k] = v end end end