class Comet::AdminUserPermissions
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 'PreventEditServerSettings' @prevent_edit_server_settings = v when 'PreventServerShutdown' @prevent_server_shutdown = v when 'PreventChangePassword' @prevent_change_password = v when 'AllowEditBranding' @allow_edit_branding = v when 'AllowEditEmailOptions' @allow_edit_email_options = v when 'AllowEditRemoteStorage' @allow_edit_remote_storage = v when 'AllowEditWebhooks' @allow_edit_webhooks = v when 'AllowEditExternalAuthSources' @allow_edit_external_auth_sources = v when 'DenyConstellationRole' @deny_constellation_role = v when 'DenyViewServerHistory' @deny_view_server_history = v when 'DenyViewServerInfo' @deny_view_server_info = v when 'PreventRequestStorageVault' @prevent_request_storage_vault = v when 'PreventAddCustomStorageVault' @prevent_add_custom_storage_vault = v when 'HideCloudStorageBranding' @hide_cloud_storage_branding = v when 'ShouldRestrictProviderList' @should_restrict_provider_list = v when 'AllowedProvidersWhenRestricted' if v.nil? @allowed_providers_when_restricted = [] else @allowed_providers_when_restricted = Array.new(v.length) v.each_with_index do |v1, i1| raise TypeError, "'v1' expected Numeric, got #{v1.class}" unless v1.is_a? Numeric @allowed_providers_when_restricted[i1] = v1 end end when 'AllowedUserPolicies' if v.nil? @allowed_user_policies = [] else @allowed_user_policies = Array.new(v.length) v.each_with_index do |v1, i1| raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String @allowed_user_policies[i1] = v1 end end else @unknown_json_fields[k] = v end end end