class Comet::Organization
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 'AuditFileOptions' @audit_file_options = {} if v.nil? @audit_file_options = {} else v.each do |k1, v1| @audit_file_options[k1] = Comet::FileOption.new @audit_file_options[k1].from_hash(v1) end end when 'Branding' @branding = Comet::BrandingOptions.new @branding.from_hash(v) when 'ConstellationRole' @constellation_role = Comet::ConstellationRoleOptions.new @constellation_role.from_hash(v) when 'Email' @email = Comet::EmailOptions.new @email.from_hash(v) when 'ExperimentalOptions' if v.nil? @experimental_options = [] else @experimental_options = Array.new(v.length) v.each_with_index do |v1, i1| raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String @experimental_options[i1] = v1 end end when 'Hosts' if v.nil? @hosts = [] else @hosts = Array.new(v.length) v.each_with_index do |v1, i1| raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String @hosts[i1] = v1 end end when 'Name' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @name = v when 'IsSuspended' @is_suspended = v when 'PSAConfigs' if v.nil? @psaconfigs = [] else @psaconfigs = Array.new(v.length) v.each_with_index do |v1, i1| @psaconfigs[i1] = Comet::PSAConfig.new @psaconfigs[i1].from_hash(v1) end end 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 'SoftwareBuildRole' @software_build_role = Comet::SoftwareBuildRoleOptions.new @software_build_role.from_hash(v) when 'WebhookOptions' @webhook_options = {} if v.nil? @webhook_options = {} else v.each do |k1, v1| @webhook_options[k1] = Comet::WebhookOption.new @webhook_options[k1].from_hash(v1) end end else @unknown_json_fields[k] = v end end end