def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        super().serialize(writer)
        writer.write_bool_value("enabled", self.enabled)
        writer.write_collection_of_primitive_values("excludedGroups", self.excluded_groups)
        writer.write_collection_of_primitive_values("includedGroups", self.included_groups)
        writer.write_bool_value("overrideDefaultRule", self.override_default_rule)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/on_premises_conditional_access_settings.py