class Forgejo::Team

def initialize(attributes = {})

Parameters:
  • attributes (Hash) -- Model attributes in the form of hash
def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Forgejo::Team` initialize method"
  end
  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `Forgejo::Team`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }
  if attributes.key?(:'can_create_org_repo')
    self.can_create_org_repo = attributes[:'can_create_org_repo']
  end
  if attributes.key?(:'description')
    self.description = attributes[:'description']
  end
  if attributes.key?(:'id')
    self.id = attributes[:'id']
  end
  if attributes.key?(:'includes_all_repositories')
    self.includes_all_repositories = attributes[:'includes_all_repositories']
  end
  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end
  if attributes.key?(:'organization')
    self.organization = attributes[:'organization']
  end
  if attributes.key?(:'permission')
    self.permission = attributes[:'permission']
  end
  if attributes.key?(:'units')
    if (value = attributes[:'units']).is_a?(Array)
      self.units = value
    end
  end
  if attributes.key?(:'units_map')
    if (value = attributes[:'units_map']).is_a?(Hash)
      self.units_map = value
    end
  end
end